protected void databind() { T_Scrap bll = new T_Scrap(); rpList.DataSource = bll.GetList(new E_Scrap() { EnterpriseID = EnterpriceID }); rpList.DataBind(); }
/// <summary> /// 数据绑定 /// </summary> protected void databind() { T_Scrap bll = new T_Scrap(); rpList.DataSource = bll.GetList(new E_Scrap() { PersonalID = PersonalID }); rpList.DataBind(); }
/// <summary> /// 录入新报废理由 /// </summary> void ScrapAdd() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); string name = nv["name"]; E_Scrap data = new E_Scrap(); data.PersonalID = pp.PersonalID; data.ScrapID = 0; data.ScrapName = name; int scrapid = new T_Scrap().Add(data); HttpContext.Current.Response.Write(scrapid); }
/// <summary> /// 删除报废理由 /// </summary> void ScrapDelete() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int scrapid = 0; int.TryParse(nv["scrapid"], out scrapid); E_Scrap data = new E_Scrap(); data.PersonalID = pp.PersonalID; data.ScrapID = scrapid; bool b = new T_Scrap().Delete(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 报废理由是否存在 /// </summary> void ScrapExists() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int scrapid = 0; int.TryParse(nv["scrapid"], out scrapid); string name = nv["name"]; E_Scrap data = new E_Scrap(); data.EnterpriseID = ep.EnterpriceID; data.ScrapID = scrapid; data.ScrapName = name; bool b = new T_Scrap().Exists(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 录入新报废理由 /// </summary> void ScrapAdd() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); string name = nv["name"]; E_Scrap data = new E_Scrap(); data.EnterpriseID = ep.EnterpriceID; data.ScrapID = 0; data.ScrapName = name; int scrapid = new T_Scrap().Add(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "添加报废理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(scrapid); }
/// <summary> /// 删除报废理由 /// </summary> void ScrapDelete() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int scrapid = 0; int.TryParse(nv["scrapid"], out scrapid); E_Scrap data = new E_Scrap(); data.EnterpriseID = ep.EnterpriceID; data.ScrapID = scrapid; int result = new T_Scrap().Delete(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "删除报废理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(result.ToString()); }
/// <summary> /// 修改报废理由 /// </summary> void ScrapUpdate() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int scrapid = 0; int.TryParse(nv["scrapid"], out scrapid); string name = nv["name"]; E_Scrap data = new E_Scrap(); data.EnterpriseID = ep.EnterpriceID; data.ScrapID = scrapid; data.ScrapName = name; bool b = new T_Scrap().Update(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "修改报废理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 获取显示报废理由 /// </summary> void ScrapShow() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int scrapid = 0; int.TryParse(nv["scrapid"], out scrapid); E_Scrap data = new E_Scrap(); data.EnterpriseID = ep.EnterpriceID; data.ScrapID = scrapid; data = new T_Scrap().GetModel(data); if (data == null) { data = new E_Scrap(); data.ScrapID = 0; } JsonObjectCollection colDR = new JsonObjectCollection(); colDR.Add(new JsonStringValue("id", data.ScrapID.ToString())); colDR.Add(new JsonStringValue("name", data.ScrapName)); HttpContext.Current.Response.Write(colDR.ToString()); }