String strplanreceiver = String.
Empty; String strplanreceiverole = String.
Empty;
Taskmodel model = new Taskmodel ();
Systemmanager Syman = new Systemmanager (); Model = Syman.gettaskreceiverinfobyid (TaskID);
According to TaskID get the task recipient configuration information if (model!= null) {#region construct the receiver, receiver role string, and go to heavy Constructs the receiver, recipient role string, which is used to send messages strplanreceiver + = model.
Planreceiver + ","; Strplanreceiver + = model.
PlanReceiver0 + ","; Strplanreceiver + = model.
PlanReceiver1 + ","; Strplanreceiver + = model.
PlanReceiver2 + ","; Strplanreceiver + = model.
PlanReceiver3 + ",";
Strplanreceiver = Strplanreceiver.trim (', '); Strplanreceiverole + = model.
Planreceiverole + ","; Strplanreceiverole + = model.
PlanReceiveRole0 + ","; Strplanreceiverole + = model.
PlanReceiveRole1 + ","; StrpLanreceiverole + = model.
PlanReceiveRole2 + ","; Strplanreceiverole + = model.
PlanReceiveRole3 + ",";
Strplanreceiverole = Strplanreceiverole.trim (', '); The string goes heavy Strplanreceiver = Stringunique (strplanreceiver); Receiver string to go heavy Strplanreceiverole = Stringunique (strplanreceiverole); Receive role string to #endregion}
#region string to///<summary>///string///</summary>///<param name= "Strli
St "></param>///<returns></returns> private String Stringunique (String strlist) {//1. Converts strings to array string result = String.
Empty;
string[] Str_num = Strlist.split (', ');
2. Define ArrayList to determine that the repeating field in the array is not added to the ArrayList object ArrayList al = new ArrayList (); for (int i = 0; i < Str_num. Length; i++) {//To determine whether an if (AL) already exists. Contains (str_num[i]) = = False) {al.
ADD (Str_num[i]); }//3. Converts ArrayList to an array of str_num = new String[al.
Count]; Str_num = (string[]) al.
ToArray (typeof (String)); 3. Array to string, and a comma interval result = string.
Join (",", str_num);
return result;; } #endregion