示例#1
0
 public void SaveItem()
 {
     string _FOrgId = Parameters["pFOrgId"];
     // other paramters fill here
     string _orgname = Parameters["pFOrgName"];
     string _deptid = Parameters["pDeptId"];
     string _orgtype = Parameters["pFOrgType"];
     string _order = Parameters["pOrder"];
     string _parentid = Parameters["pParentId"];
     string _newdate = Parameters["pNewDate"];
     PmOrgInfo item = new PmOrgInfo();
     item.FOrgId = string.IsNullOrEmpty(_FOrgId) ? 0 : Convert.ToInt64(_FOrgId);
     item.FDepartmentID = Convert.ToInt64(_deptid);
     item.FOrgName = _orgname;
     item.FOrgType = _orgtype;
     item.FParentOrgId = Convert.ToInt32(_parentid);
     item.FOrgOrder = Convert.ToInt32(_order);
     item.FOrgNewDate = Convert.ToDateTime(_newdate);
     PmOrgInfoBiz biz = new PmOrgInfoBiz();
     ErrorEntity ErrInfo = new ErrorEntity();
     if (item.FOrgId == 0)
     {
         biz.Insert(item, out ErrInfo);
     }
     else
     {
         biz.Update(item, out ErrInfo);
     }
     Response.Write(ErrInfo.ToJson());
 }