protected override string AddData() { RDFNew.Module.Admin.Pur.Pur_PoM obj = new RDFNew.Module.Admin.Pur.Pur_PoM(); DataTable dt = RDFNew.Module.DALHelper.GetMasterEmpty(null, "Pur_PoM"); DataRow dr; dr = dt.NewRow(); dr["PoMID"] = App_Com.Helper.InputText(this.txtPoMID.Text, 500); dr["PoMDate"] = App_Com.Helper.InputText(this.txtPoMDate.Text, 500); dr["PartnerID"] = App_Com.Helper.InputText(this.txtPartnerID.Text, 500); dr["DeliveryDate"] = App_Com.Helper.InputText(this.txtDeliveryDate.Text, 500); dr["Remark"] = App_Com.Helper.InputText(this.txtRemark.Text, 500); dr["CrtBy"] = App_Com.Sys_User.GetUserInfo("UserID"); dr["CrtOn"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); dt.Rows.Add(dr); BuildDetail(); DataTable dtDetail = App_Com.Helper.GetSession(B_DetailSessionKey, false) as DataTable; object[] data = obj.ApplyMaster(dt.GetChanges(DataRowState.Added),dtDetail, App_Com.Helper.BuildLog("Pur_PoM", "add")); if (data[0].ToString() != "0") //正常 throw data[1] as Exception; else return data[1].ToString(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); B_ModuleID = "Pur_PoM"; B_ModuleName = "采购订单"; B_PageDetail = "Pur_PoM.aspx"; B_ToolBar1 = this.Toolbar1; B_Window1 = this.Window1; B_Grid1 = this.Grid1; B_IDAL = new RDFNew.Module.Admin.Pur.Pur_PoM(); B_TableKey = "Pur_PoM.PoMID"; B_OrderBy = " Pur_PoM.PoMID Desc "; }
void WebReport1_StartReport(object sender, EventArgs e) { RDFNew.Module.Admin.Pur.Pur_PoM obj = new RDFNew.Module.Admin.Pur.Pur_PoM(); RDFNew.Module.DALEntity.QuerySet qs = new RDFNew.Module.DALEntity.QuerySet(); qs.QueryInfos = GetQueryInfo(); qs.OrderBy = " Pur_PoM.PoMID Desc "; object[] data = obj.GetMaster(qs); if (data[0].ToString() == "0") //正常 { DataTable dt = data[1] as DataTable; Report FReport = (sender as FastReport.Web.WebReport).Report; FReport.RegisterData(dt, "Table"); } }
DataTable GetMaster() { RDFNew.Module.Admin.Pur.Pur_PoM obj = new RDFNew.Module.Admin.Pur.Pur_PoM(); DataTable dt = obj.GetMaster(B_Keyword)[1] as DataTable; return dt; }
protected override string UpdateData() { RDFNew.Module.Admin.Pur.Pur_PoM obj = new RDFNew.Module.Admin.Pur.Pur_PoM(); object[] data = obj.GetMaster(B_Keyword); if (data[0].ToString() == "0") //正常 { DataTable dt = data[1] as DataTable; if (dt.Rows.Count > 0) { DataRow dr; dr = dt.Rows[0]; dr["PoMDate"] = App_Com.Helper.InputText(this.txtPoMDate.Text, 500); dr["PartnerID"] = App_Com.Helper.InputText(this.txtPartnerID.Text, 500); dr["DeliveryDate"] = App_Com.Helper.InputText(this.txtDeliveryDate.Text, 500); dr["Remark"] = App_Com.Helper.InputText(this.txtRemark.Text, 500); dr["ModBy"] = App_Com.Sys_User.GetUserInfo("UserID"); dr["ModOn"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); BuildDetail(); DataTable dtDetail = App_Com.Helper.GetSession(B_DetailSessionKey, false) as DataTable; data = obj.ApplyMaster(dt.GetChanges(DataRowState.Modified),dtDetail, App_Com.Helper.BuildLog("Pur_PoM", "edit")); if (data[0].ToString() != "0") //正常 throw data[1] as Exception; else return data[1].ToString(); } else { throw new Exception("需要修改的记录已不存在,请刷新后再试."); } } else { throw data[1] as Exception; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); B_ModuleID = "Pur_PoM"; B_ModuleName = "采购订单"; B_ToolBar1 = this.Toolbar1; B_IDAL = new RDFNew.Module.Admin.Pur.Pur_PoM(); B_ToolBar2 = this.Toolbar2; B_Grid1 = this.Grid1; B_Window1 = this.Window1; B_PageDetail = "Pur_PoD.aspx"; B_PageDetailAdd = "Pur_PoDAdd.aspx"; B_DetailSessionKey = "Pur_PoDAdd"; B_PrintDetail = true; }