//AUTHOR : KHIN MYO MYO SHWE public WCFDept GetDeptInfo(string dcode) { string collectpoint = deptController.GetDepartmentForCollectionPointSelected(dcode); Department d = deptController.GetDepartByDepCode(dcode); return(WCFDept.Make(d.DeptCode, collectpoint, d.DeptName, d.DeptContactName, d.DeptTelephone, d.DeptFax)); }
//AUTHOR : KHIN MYO MYO SHWE public void UpdateCollect(WCFDept d) { Department dept = new Department { DeptCode = d.DeptCode, CollectionLocationID = Convert.ToInt32(d.Collectid) }; deptController.UpdateCollectionPoint(dept.DeptCode, Convert.ToInt16(dept.CollectionLocationID)); }
//End Employee Function Part //AUTHOR : KHIN MYO MYO SHWE //Start Department Function Part public List <WCFDept> DepartmentList() { List <WCFDept> wlist = new List <WCFDept>(); List <Department> dlist = deptController.GetDepartList(); foreach (Department d in dlist) { wlist.Add(WCFDept.Make(d.DeptCode, Convert.ToString(d.CollectionLocationID), d.DeptName, d.DeptContactName, d.DeptTelephone, d.DeptFax)); } return(wlist); }
public static WCFDept Make(string deptCode, string collectid, string dname, string contactname, string telephone, string fax) { WCFDept d = new WCFDept(); d.deptCode = deptCode; d.collectid = collectid; d.dname = dname; d.contactname = contactname; d.telephone = telephone; d.fax = fax; return(d); }