本文整理汇总了C#中ErrorEntity类的典型用法代码示例。如果您正苦于以下问题:C# ErrorEntity类的具体用法?C# ErrorEntity怎么用?C# ErrorEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorEntity类属于命名空间,在下文中一共展示了ErrorEntity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveItem
public void SaveItem()
{
string _positionname = Parameters["ppositionname"];
string _positiondept = Parameters["ppositiondept"];
string _positiontype = Parameters["ppositiontype"];
string _positiongendor = Parameters["ppositiongendor"];
string _positionnumber = Parameters["ppositionnumber"];
string _positionbegindate = Parameters["pbegindate"];
string _positionenddate = Parameters["penddate"];
string _backcontent = Parameters["pbackcontent"];
string _content = Parameters["pcontent"];
string _order = Parameters["porder"];
string positionid = Parameters["id"];
PortalPosition item = new PortalPosition();
PortalPositionBiz biz = new PortalPositionBiz();
item.FPositionId = Convert.ToInt64(positionid);
item.FPositionName = _positionname;
item.FPositionDept = _positiondept;
item.FPositionType = _positiontype;
item.FPositionGendor = _positiongendor;
item.FPositionNum = Convert.ToInt32(_positionnumber);
item.FBeginDate = Convert.ToDateTime(_positionbegindate);
item.FEndDate = Convert.ToDateTime(_positionenddate);
item.FBackContent = _backcontent;
item.FPositionContent = _content;
item.FPositionOrder = Convert.ToInt32(_order);
ErrorEntity ErrInfo = new ErrorEntity();
biz.Update(item, out ErrInfo);
Response.Write(ErrInfo.ToJson());
}
示例2: Insert
public Int64 Insert(OEQuestionBank item, out ErrorEntity ErrInfo)
{
//Error Judge Define
if (item.FContentClassId == 0)
{
ErrInfo = new ErrorEntity("QB010001", "内容类别不能为空!");
return -1;
}
if (string.IsNullOrEmpty(item.FQBankCode))
{
ErrInfo = new ErrorEntity("QB010002", "题库编号不能为空!");
return -1;
}
if (string.IsNullOrEmpty(item.FQBankName))
{
ErrInfo = new ErrorEntity("QB010003", "题库名称不能为空!");
return -1;
}
if (!ChkCodeDuplicate(item.FQBankId.ToString(), item.FQBankCode))
{
ErrInfo = new ErrorEntity("QB010004", "题库编号重复,不能保存!");
return -1;
}
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FContentClassId", item.FContentClassId.ToString());
parameters.Add("FQBankCode", item.FQBankCode);
parameters.Add("FQBankName", item.FQBankName);
parameters.Add("FQBankContent", item.FQBankContent);
return Insert(parameters, out ErrInfo);
}
示例3: SaveProduct
public void SaveProduct()
{
string _productname = Parameters["pproductname"];
string _productlist = Parameters["pproductlist"];
string _productmodule = Parameters["pproductmodule"];
string _productdesc = Parameters["pproductdesc"];
string _briefpath = Parameters["pbriefpath"];
string _path = Parameters["ppath"];
string _briefcontent = Parameters["pbriefcontent"];
string _content = Parameters["pcontent"];
string _seotitle = Parameters["pseotitle"];
string _seokeyword = Parameters["pseokeyword"];
string _seodesc = Parameters["pseodesc"];
PortalProduct item = new PortalProduct();
item.FProductId = 0;
item.FProductListID = Convert.ToInt64(_productlist);
item.FProductName = _productname;
item.FProductModule = _productmodule;
item.FProductDesc = _productdesc;
item.FProductPic = _path;
item.FBriefPic = _briefpath;
item.FSEOTitle = _seotitle;
item.FSEOKeyWord = _seokeyword;
item.FSEODesc = _seodesc;
item.FProductBrief = _briefcontent;
item.FProductContent = _content;
PortalProductBiz biz = new PortalProductBiz();
ErrorEntity ErrInfo = new ErrorEntity();
biz.Insert(item, out ErrInfo);
Response.Write(ErrInfo.ToJson());
}
示例4: Insert
public Int64 Insert(PortalArticleList item, out ErrorEntity ErrInfo)
{
if(string.IsNullOrEmpty(item.FListName))
{
ErrInfo = new ErrorEntity("999999","目录名称不能为空!");
return -1;
}
if(item.FListOrder == 0)
{
ErrInfo = new ErrorEntity("999999","目录顺序不能为空!");
return -1;
}
if (ChkNameExist(item.FListId, item.FParentListId, item.FListName))
{
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FListName", item.FListName);
parameters.Add("FListOrder", item.FListOrder.ToString());
if (item.FParentListId > 0)
{
parameters.Add("FParentListId", item.FParentListId.ToString());
}
Int64 result = Insert(parameters, out ErrInfo);
return result;
}
else
{
ErrInfo = new ErrorEntity("999999", "目录名称重复,无法保存!");
return -1;
}
}
示例5: Insert
public int Insert(string _userid, string _deptlistid, out ErrorEntity ErrInfo)
{
NameValueCollection where = new NameValueCollection();
where.Add("FUserId", _userid);
if (Delete(where, out ErrInfo) >= 0)
{
string[] deptidarray;
deptidarray = _deptlistid.Split(',');
for (int i = 0; i < deptidarray.Length; i++)
{
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FUserId", _userid);
parameters.Add("FDepartmentId", deptidarray[i]);
Insert(parameters, out ErrInfo);
if (ErrInfo.ErrorCode != RespCode.Success)
{
return -1;
}
}
return 1;
}
else
{
return -1;
}
}
示例6: Insert
public Int64 Insert(PortalProduct item, out ErrorEntity ErrInfo)
{
if (item.FProductListID == 0)
{
ErrInfo = new ErrorEntity(RespCode.Pp01003);
return -1;
}
if (string.IsNullOrEmpty(item.FProductName))
{
ErrInfo = new ErrorEntity(RespCode.Pp01004);
return -1;
}
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FProductListID", item.FProductListID.ToString());
parameters.Add("FProductName", item.FProductName);
parameters.Add("FProductModule", item.FProductModule);
parameters.Add("FProductDesc", item.FProductDesc);
parameters.Add("FProductPic", item.FProductPic);
parameters.Add("FBriefPic", item.FBriefPic);
parameters.Add("FSEOTitle", item.FSEOTitle);
parameters.Add("FSEOKeyWord", item.FSEOKeyWord);
parameters.Add("FSEODesc", item.FSEODesc);
parameters.Add("FProductBrief", item.FProductBrief);
parameters.Add("FProductContent", item.FProductContent);
return Insert(parameters, out ErrInfo);
}
示例7: Delete
public int Delete(string idlist, out ErrorEntity ErrInfo)
{
NameValueCollection where = new NameValueCollection();
idlist = idlist.Replace(",", "','");
where.Add("condition", "FStudentId in ('" + idlist + "')");
return Delete(where, out ErrInfo);
}
示例8: SaveItem
public void SaveItem()
{
string _columnid = Parameters["colid"];
string _navid = Parameters["pnavid"];
string _navname = Parameters["pnavname"];
string _navtype = Parameters["pnavtype"];
string _navposition = Parameters["pnavposition"];
string _navvisible = Parameters["pnavvisible"];
string _order = Parameters["porder"];
PortalColumnNavBiz biz = new PortalColumnNavBiz();
PortalColumnNav item = new PortalColumnNav();
item.FColumnId = Convert.ToInt64(_columnid);
item.FNavId = Convert.ToInt64(_navid);
item.FNavName = _navname;
item.FNavOrder = Convert.ToInt32(_order);
item.FNavPosition = _navposition;
item.FNavType = _navtype;
item.FNavVisible = _navvisible;
ErrorEntity ErrInfo = new ErrorEntity();
if (item.FNavId == 0)
{
biz.Insert(item, out ErrInfo);
}
else
{
biz.Update(item, out ErrInfo);
}
Response.Write(ErrInfo.ToJson());
}
示例9: Insert
public Int64 Insert(PmOrgInfo item, out ErrorEntity ErrInfo)
{
if (string.IsNullOrEmpty(item.FOrgName))
{
ErrInfo = new ErrorEntity("OI010001", "组织名称不能为空!");
return -1;
}
if (string.IsNullOrEmpty(item.FOrgType))
{
ErrInfo = new ErrorEntity("OI010002", "组织类型不能为空!");
return -1;
}
if (item.FDepartmentID == 0)
{
ErrInfo = new ErrorEntity("OI010003", "所属部门不能为空!");
return -1;
}
if (item.FOrgOrder == 0)
{
ErrInfo = new ErrorEntity("OI010004", "组织显示顺序不能为空!");
return -1;
}
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FDepartmentID", item.FDepartmentID.ToString());
parameters.Add("FOrgName", item.FOrgName);
parameters.Add("FParentOrgId", item.FParentOrgId.ToString());
parameters.Add("FOrgType", item.FOrgType);
parameters.Add("FOrgNewDate", item.FOrgNewDate.ToString());
parameters.Add("FOrgOrder", item.FOrgOrder.ToString());
return Insert(parameters, out ErrInfo);
}
示例10: Save
public Int32 Save(PortalChildColumnContent item, out ErrorEntity ErrInfo)
{
NameValueCollection where = new NameValueCollection();
where.Add("FChildColumnId", item.FChildColumnId.ToString());
Delete(where, out ErrInfo);
if (ErrInfo.ErrorCode == RespCode.Success)
{
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FChildColumnId", item.FChildColumnId.ToString());
parameters.Add("FCCContentText", item.FCCContentText);
parameters.Add("FSEOTitle", item.FSEOTitle);
parameters.Add("FSEOKeyWord", item.FSEOKeyWord);
parameters.Add("FSEODescription", item.FSEODescription);
Insert(parameters, out ErrInfo);
if (ErrInfo.ErrorCode == RespCode.Success)
{
return 1;
}
else
{
return -1;
}
}
else
{
return -1;
}
}
示例11: Insert
public Int64 Insert(PmOrgLeader item, out ErrorEntity ErrInfo)
{
if (string.IsNullOrEmpty(item.FLeaderName))
{
ErrInfo = new ErrorEntity("PL010001", "领导姓名不能为空!");
return -1;
}
if(string.IsNullOrEmpty(item.FLeaderPostion))
{
ErrInfo = new ErrorEntity("PL010002","领导职务不能为空!");
return -1;
}
if (item.FLeaderOrder == 0)
{
ErrInfo = new ErrorEntity("PL010003", "领导显示顺序不能为空!");
return -1;
}
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FOrgId", item.FOrgId.ToString());
parameters.Add("FLeaderName", item.FLeaderName);
parameters.Add("FLeaderPostion", item.FLeaderPostion);
parameters.Add("FLeaderOrder", item.FLeaderOrder.ToString());
return Insert(parameters, out ErrInfo);
}
示例12: Delete
public int Delete(NameValueCollection where, out ErrorEntity ErrInfo)
{
OEQuestionDA da = new OEQuestionDA();
NameValueCollection parameters = new NameValueCollection();
parameters.Add("FQuestionStatus", "0");
return Update(parameters, where, out ErrInfo);
}
示例13: DelDepartment
public void DelDepartment()
{
string idlist = Parameters["pparm"];
SysDepartmentBiz biz = new SysDepartmentBiz();
ErrorEntity ErrInfo = new ErrorEntity();
biz.Delete(idlist, out ErrInfo);
Response.Write(ErrInfo.ToJson());
}
示例14: StopModule
public void StopModule()
{
string _moduleflag = Parameters["pmoduleflag"];
SysModuleBiz biz = new SysModuleBiz();
ErrorEntity ErrInfo = new ErrorEntity();
biz.UpdateStatus(_moduleflag, "0", out ErrInfo);
Response.Write(ErrInfo.ToJson());
}
示例15: DelList
public void DelList()
{
string idlist = Parameters["pparm"];
PortalArticleListBiz biz = new PortalArticleListBiz();
ErrorEntity ErrInfo = new ErrorEntity();
biz.Delete(idlist, out ErrInfo);
Response.Write(ErrInfo.ToJson());
}