public static void WriteLog_Time(string className, string methodName, string strLog, int startTime) { ExceptionLog log = new ExceptionLog { ErrClassName = className }; log.ErrMessage = strLog + "。执行花费时间:" + ((End - startTime)).ToString(); log.ErrMethod = methodName; log.WriteExceptionLog(true); }
protected void Page_Load(object sender, EventArgs e) { this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); if (!base.IsPostBack) { if (this.Session["user"] == null) { Const.GoLoginPath_OpenWindow(this.Page); } else { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; ButtonsModel model = new ButtonsModel(userName) { IfAdd = false, IfUpdate = false, IfDelete = false, IfLook = false, IfSearch = false, IfRefresh = true, IfHuiZong = false, IfPutOut = false, IfSet = false, IfExit = true }; this.Master.btModel = model; if ((base.Request["PK"] != null) && (base.Request["PK"].ToString() != "")) { if (PowerClass.IfHasPower(userName, power, PowerNum.BankCardUpdate)) { model.IfSave = true; this.Master.LBTitle = "乡镇财政资金监管信息系统 - 修改单位帐户信息"; this.Master.TitlePic = "修改单位帐户信息"; try { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.bmd = new BankDal(); DataSet list = new DataSet(); list = this.bmd.GetList("BankPK='" + base.Request["PK"].ToString() + "'", this.dbo); this.txtCompany.Text = list.Tables[0].Rows[0]["Name"].ToString(); this.CompanyPk.Value = list.Tables[0].Rows[0]["pk_corp"].ToString(); this.txtBankName.Text = list.Tables[0].Rows[0]["BankName"].ToString(); this.txtBankNum.Text = list.Tables[0].Rows[0]["BankNum"].ToString(); this.txtDiscription.Text = list.Tables[0].Rows[0]["Discription"].ToString(); this.txtBankNumMan.Text = list.Tables[0].Rows[0]["BankNumMan"].ToString(); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "Page_Load()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } return; } finally { if (this.dbo != null) { this.dbo.Close(); } } } Const.SorryForPower(this.Page); } else if (PowerClass.IfHasPower(userName, power, PowerNum.BankCardAdd)) { model.IfSave = true; this.Master.LBTitle = "乡镇财政资金监管信息系统 - 新增单位帐户信息"; this.Master.TitlePic = "新增单位帐户信息"; } else { Const.SorryForPower(this.Page); } } } }
private void DataDelete(string strPK) { try { this.mm = new CompanyDal(); this.dbo = new DB_OPT(); this.dbo.Open(); this.mm.pk_corp = strPK.Trim(); if (this.mm.Delete(this.dbo) > 0) { if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void ChildDataBind(string strPK) { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.branch = new BranchDal(); DataSet viewList = this.branch.GetViewList("pk_corp='" + strPK + "'", this.dbo); if ((viewList != null) && (viewList.Tables[0].Rows.Count > 0)) { this.gvResult_child_employee.DataSource = viewList; this.gvResult_child_employee.DataBind(); } else { DataTable table = viewList.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult_child_employee.DataSource = table.DefaultView; this.gvResult_child_employee.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ChildDataBind()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["user"] != null) { if (base.Request["strTitle"] != null) { this.txttitle.Value = base.Server.UrlDecode(base.Request["strTitle"].ToString().Trim()); } this.Master.strTitle = this.txttitle.Value; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); this.Master.SearchHasGone = new SearchHandler(this.SearchControl); this.Master.PageNavigatorChange = new PageNavigatorHandler(this.PageChangControl); if (!this.Page.IsPostBack) { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; string companyPower = ((UserModel)this.Session["User"]).CompanyPower; try { ButtonsModel model = null; PublicDal.ShowListButton(this.Page, out model, ""); model.IbtDoText = "修改"; model.IfPrintNote = false; model.IfSave = true; model.IfAdd = true; model.IfDo = true; this.Master.btModel = model; } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "bind()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } } } else { Const.GoLoginPath_List(this.Page); } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); string companyWhere = PublicDal.GetCompanyWhere(); if (str != "") { str = " where " + str + " and pd_found_xz='01' and nvl(pd_project_isbxk,0)=0 " + companyWhere; } else { str = "where pd_found_xz='01' and nvl(pd_project_isbxk,0)=0 " + companyWhere; } DataSet set = this.pagesize.pagesize("*", "VIEW_PD_PROJECT_LIST", str, "pd_project_code", " order by pd_project_code desc ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataTable table = new DataTable(); table = set.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void addupdate() { try { this.dbo = new DB_OPT(); this.dbo.Open(); if ((this.txtname.Text.Trim() == "") || (this.txtBH.Text.Trim() == "")) { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { this.ubtm = new UsualBookTableDal(); this.um = new UsualBookTableModel(); this.ubtm.FatherPK = this.FatherPk.Value.Trim(); this.ubtm.TableName = base.Request.QueryString["tn"].ToString().Trim(); if (this.ubtm.FatherPK != "") { this.ubtm.PK = this.ubtm.FatherPK.Trim(); this.um = this.ubtm.GetModel(false, this.dbo); if (this.um.IsHasBaby == "0") { this.ubtm.TableName = base.Request.QueryString["tn"].ToString(); this.ubtm.UpdateHasBaby(this.dbo); } this.ubtm.PKPath = this.ubtm.PKPath + this.ubtm.PK + "|"; this.ubtm.Grade = this.um.Grade; } this.ubtm.BH = this.txtBH.Text.Trim(); this.ubtm.TableName = base.Request.QueryString["tn"].ToString().Trim(); this.ubtm.Name = this.txtname.Text.Trim(); this.ubtm.Discription = this.txtDiscription.Text.Trim(); this.ubtm.FatherPK = this.FatherPk.Value.Trim(); this.ubtm.IsHasBaby = "0"; this.ubtm.Grade++; int count = 0; if ((base.Request["PK"] != null) && (base.Request["PK"].ToString() != "")) { this.ubtm.PK = base.Request["PK"].ToString().Trim(); Const.UpdateSuccess(this.ubtm.Update(this.dbo), this.Page); } else { this.ubtm.BH = this.txtBH.Text.Trim(); if (this.ubtm.Exists(this.dbo) > 0) { Const.ShowMessage("该编号已经存在!", this.Page); } else { count = this.ubtm.Add(this.dbo); if (base.Request["reload"] != null) { Const.AddSuccess(count, base.Request["reload"].ToString(), this.Page); } else { Const.AddSuccess(count, "", this.Page); } } } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "addupdate()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
private void AddKHTypeDetail() { try { if (this.txtKPContent.Text.Trim() == "") { Const.ShowMessage("请输入考评内容!", this.Page); } if (this.txtKP_BiaoZhun.Text.Trim() == "") { Const.ShowMessage("请输入扣分标准!", this.Page); } else { PD_BASE_KAOPINGTYPEDETAIL_Model model = new PD_BASE_KAOPINGTYPEDETAIL_Model(); PD_BASE_KAOPINGTYPEDETAIL_Bll bll = new PD_BASE_KAOPINGTYPEDETAIL_Bll(); model.KP_CONTENT = this.txtKPContent.Text; model.KP_BIAOZHUN = this.txtKP_BiaoZhun.Text; model.KP_YEAR = this.ddlKP_Year.SelectedValue; model.KP_TYPEID = new int?(int.Parse(this.txtKHTypeID.Value)); DataSet set = DbHelperOra.Query("select khtypeper from PD_BASE_KAOPINGTYPE where auto_id=" + model.KP_TYPEID); if (set != null) { model.KP_BASECODE = new int?(Convert.ToInt32(set.Tables[0].Rows[0][0].ToString())); } else { model.KP_BASECODE = 0; } model.ISCOMFIRM = this.ddlIsComfirm.SelectedValue.ToString(); bll.Add(model); Const.DoSuccessOpen("", this.Page); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "AddMenu()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } }
protected void Page_Load(object sender, EventArgs e) { this.txtMenuPX.Attributes.Add("onkeypress", "javascript:return onlyNum();"); this.Master.LBTitle = "乡镇财政资金监管信息系统 - 修改菜单"; this.Master.TitlePic = "~/images/页标题/修改菜单副本.jpg"; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); if (!this.Page.IsPostBack && (this.Session["User"] != null)) { if (base.Request.QueryString["PK"] != null) { try { try { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; ButtonsModel model = new ButtonsModel(userName); if (PowerClass.IfHasPower(userName, power, PowerNum.MenuUpdate)) { model.IfAdd = false; model.IfSave = true; model.IfUpdate = false; model.IfDelete = false; model.IfLook = false; model.IfSearch = false; model.IfRefresh = true; model.IfHuiZong = false; model.IfPutOut = false; model.IfSet = false; model.IfExit = true; this.Master.btModel = model; this.dbo = new DB_OPT(); this.dbo.Open(); this.mm = new MenuDal(); this.mm.MemuPK = base.Request.QueryString["PK"].ToString(); this.mm = this.mm.GetModel(false, this.dbo); this.SetValue(this.mm); } else { Const.SorryForPower(this.Page); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "Page_Load()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } goto Label_0237; } finally { if (this.dbo != null) { this.dbo.Close(); } } } Const.GoLoginPath_Open(this.Page); } Label_0237: this.fl1.VirtualCatalog = ""; this.fl1.ImagePath = "System/menu/images"; }
private void DataDelete(string strPK, string bh, string name, string company, string branch) { try { if (PublicDal.IsDelete(this.Page, "PD_FOUND_OUT", "AUTO_NO", strPK, "PD_NOW_SERVERPK")) { new PD_FOUND_OUT_Bll().Delete(Convert.ToInt32(strPK)); if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } else { PageShowText.ShowMessage("单据已进入业务流程,需删除请追回单据后再进行删除。", this.Page); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); string companyWhere = PublicDal.GetCompanyWhere(); if (str != "") { str = " where " + str + companyWhere; } else { str = " where 1=1" + companyWhere; } DataSet ds = this.pagesize.pagesize("*", "v_pd_found_out_list", str, "auto_no", "", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if (this.gvResult.Columns.Count == 0) { PublicDal.setGViewColumns(ds, this.gvResult); DataSet dataSetClo = null; DataSet dataSetTable = null; PublicDal.GetSelectTJ(this.gvResult, ref dataSetClo, ref dataSetTable, null); this.Master.DataSetClo = dataSetClo; this.Master.DataSetTable = dataSetTable; } if ((ds != null) && (ds.Tables[0].Rows.Count > 0)) { PublicDal.NewTotalMoneyRow(ds); DataView defaultView = ds.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataTable table = new DataTable(); table = ds.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { if (base.Request.QueryString["tn"] != null) { UsualBookTable table = new UsualBookTable(); string str = base.Request.QueryString["tn"]; try { string companyPower; string str6; this.dbo = new DB_OPT(); this.dbo.Open(); switch (str) { case "ContractName": { table.PageTitle = "合同信息参照"; table.TableName = "PD_Project_Contract"; table.Columns = "PD_Contract_No as PK,PD_CONTRACT_NAME as 合同名称,'','','',''"; UserModel model = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model.GetModel(this.dbo); companyPower = model.CompanyPower; goto Label_3001; } case "SubjectKind": table.PageTitle = "项目类别参照"; table.TableName = "SubjectKind"; table.Columns = "PK as PK,Name as 项目类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "Custom": table.PageTitle = "客户参照"; table.TableName = "Custom"; table.Columns = "CusPK as PK,CustomName as 客户名称,City as 城市,Address as 地址,0,'',0,''"; goto Label_30B8; case "Linkman": if ((base.Request.QueryString["cuspk"] != null) && (base.Request.QueryString["cuspk"] != "")) { table.StrWhere = "CusPK='" + base.Request.QueryString["cuspk"].ToString() + "'"; } table.PageTitle = "联系人参照"; table.TableName = "Linkman"; table.Columns = "LMPK as PK,Name as 联系人名称,Sex as 性别,Age as 年龄,OfficePhone as 办公电话,0,'',0,''"; goto Label_30B8; case "Employee": table.PageTitle = "员工参照"; table.TableName = "DB_Employee"; table.Columns = " EmployeePK as PK,Name as 员工名称,Grade as 等级,FatherPK,IsHasBaby,PKPath "; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = " pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "ContratKind": table.PageTitle = "合同类别参照"; table.TableName = "ContratKind"; table.Columns = "PK as PK,Name as 合同类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "ContractsMessage": table.PageTitle = "合同信息参照"; table.TableName = "pd_project_contract"; table.Columns = "pd_contract_no as PK,pd_contract_name as 合同名称,pd_contract_company||','||pd_contract_moeny,0,'',0,''"; table.StrWhere = " pd_project_code='" + base.Request.QueryString["project_code"].ToString() + "' and PD_CONTRACT_TYPE='" + base.Request["CONTRACTTYPE"].Trim() + "'"; goto Label_30B8; case "Subject": if ((base.Request.QueryString["cuspk"] != null) && (base.Request.QueryString["cuspk"] != "")) { table.StrWhere = "ContratPK='" + base.Request.QueryString["cuspk"].ToString() + "'"; } table.PageTitle = "合同主信息参照"; table.TableName = "Subject"; table.Columns = "SubPK as PK,ReduceName as 项目名称,0,'',0,''"; goto Label_30B8; case "Product": table.PageTitle = "物品信息参照"; table.TableName = "Product"; table.Columns = "ProPK as PK,ProductName as 物品名称,0,'',0,''"; goto Label_30B8; case "ContratPayItem": table.PageTitle = "佣金支付条款参照"; table.TableName = "ContratPayItem"; table.Columns = "ItemPK as PK,Content as 合同名称,0,'',0,''"; goto Label_30B8; case "Branch": table.PageTitle = "部门参照"; table.TableName = "DB_Branch"; table.Columns = "BranchPK as PK,Name as 部门名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = "pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "Menu": table.PageTitle = "菜单信息参照"; table.TableName = "DB_Menu"; table.Columns = "MemuPK as PK,MenuName as 菜单名称,Grade as 等级, FatherPK, IsHasBaby,''"; table.Grade = 0; goto Label_30B8; case "Branch_BH": table.PageTitle = "部门参照"; table.TableName = "DB_Branch"; table.Columns = "BH as PK,Name as 部门名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = "pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "Role": table.PageTitle = "角色参照"; table.TableName = "DB_Role"; table.Columns = "RolePK as PK,Name as 角色名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 0; table.StrWhere = table.StrWhere + " 1=1 "; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = table.StrWhere + " and pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } if ((base.Request.QueryString["branchpk"] != null) && (base.Request.QueryString["branchpk"] != "")) { table.StrWhere = table.StrWhere + " and BranchPK='" + base.Request.QueryString["branchpk"].ToString() + "'"; } goto Label_30B8; case "CustomKind": table.PageTitle = "客户类别参照"; table.TableName = "CustomKind"; table.Columns = "PK as PK,Name as 客户类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "PayType": table.PageTitle = "付款方式参照"; table.TableName = "PayType"; table.Columns = "PK as PK,Name as 付款方式,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "ContratPickUp": table.PageTitle = "合同提成参照"; table.TableName = "ContratPickUp"; table.Columns = "PUPK as PK,Content as 提成内容,0,'',0,''"; goto Label_30B8; case "HeTongBH": table.PageTitle = "合同编号参照"; table.TableName = "PD_PROJECT_CONTRACT"; table.StrWhere = "trim(PD_PROJECT_CODE)='" + base.Request["PD_PROJECT_CODE"].Trim() + "'"; table.Columns = "PD_CONTRACT_NO as PK,PD_CONTRACT_NO||' '||PD_CONTRACT_NAME 合同编号与名称,PD_CONTRACT_MOENY_CHANGE||'~'||PD_CONTRACT_NAME,'',0,''"; goto Label_30B8; case "XiangZhen": { table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = " ZXBJ!=1 "; if ((base.Request.QueryString["UsersPk"] == null) || !(base.Server.UrlDecode(base.Request.QueryString["UsersPK"]).Trim() != "")) { goto Label_30B8; } companyPower = ""; if (HttpContext.Current.Session["User"] != null) { goto Label_2FDD; } UserModel model2 = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model2.GetModel(this.dbo); companyPower = model2.CompanyPower; goto Label_3001; } case "Users": { table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; if ((base.Request.QueryString["UsersPk"] == null) || !(base.Server.UrlDecode(base.Request.QueryString["UsersPK"]).Trim() != "")) { goto Label_30B8; } companyPower = ""; if (HttpContext.Current.Session["User"] != null) { goto Label_2FDD; } UserModel model3 = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model3.GetModel(this.dbo); companyPower = model3.CompanyPower; goto Label_3001; } case "company": table.PageTitle = "单位信息参照"; table.TableName = "DB_company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; goto Label_30B8; case "Company": table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,Grade as 等级, FatherPK, IsHasBaby,''"; table.Grade = 0; goto Label_30B8; case "proj_pfwh": { string str3 = base.Request["proj"]; table.PageTitle = "上级指标文号参照"; table.TableName = "tb_quota"; if ((base.Request["loop"] != null) && (base.Request["loop"] == "1")) { table.StrWhere = " pd_project_code='" + str3 + "'"; } table.Columns = " pd_quota_code as PK,pd_quota_code||' '||pd_quota_name as pfwh,'','',''"; goto Label_30B8; } case "proj_bzwh": table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quota"; table.StrWhere = " 1=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } table.Columns = " pd_quota_zbwh as PK,ShowText as 指标文号,pd_up_money,'',''"; goto Label_30B8; case "ProjectBXK": { UserModel model4 = (UserModel)this.Session["User"]; table.PageTitle = "项目备选库"; table.TableName = "v_selectProjectCS"; table.StrWhere = " 1=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and trim(PD_FOUND_XZ)='" + base.Request["xz"].Trim() + "'"; } table.StrWhere = table.StrWhere + " and trim(pk_corp)='" + model4.Company.pk_corp.Trim() + "'"; table.StrWhere = table.StrWhere + " and trim(bh)='" + model4.Branch.BH.Trim() + "'"; table.StrWhere = table.StrWhere + " and pd_project_isbxk=1"; table.Columns = " pd_project_code as PK,pd_project_name as 项目名称,'','','' "; goto Label_30B8; } case "open_pd_quotaAddMoney": { UserModel model5 = (UserModel)this.Session["User"]; table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quotaAddMoney"; table.StrWhere = " if_show=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } if (base.Request["company_code"] != null) { table.StrWhere = table.StrWhere + " and trim(company_code)='" + model5.Company.pk_corp.Trim() + "'"; } table.Columns = " pd_quota_code as PK,ShowText as 指标文号,pd_up_money||'~'||PD_QUOTA_DEPART||'~'||PD_QUOTA_DEPART_NAME||'~'||PD_QUOTA_BASIS_JG||'~'||PD_QUOTA_ZJLY||'~'||PD_QUOTA_ZGKJ,'',''"; goto Label_30B8; } case "pd_DuoZhiBiao": break; case "ZhiBiaoJYK": table.PageTitle = "上级指标文号参照"; table.TableName = "v_quota_JieYuZB"; table.StrWhere = " PD_QUOTA_MONEY_TOTAL-sumPD_QUOTA_ZBXDZH>0 and trim(pd_quota_input_depart)='" + base.Request.Params["branch"].Trim() + "'"; table.Columns = " Minpd_quota_code as PK,PD_QUOTA_ZBWH as 指标文号,PD_QUOTA_MONEY_TOTAL||'~'||sumPD_QUOTA_ZBXDZH||'~'||pd_quota_pici,'',''"; goto Label_30B8; case "proj_bianma": table.PageTitle = "项目参照"; table.TableName = "V_PROJECTADDQUOTA"; table.Columns = "pd_project_code as PK,pd_project_name||'-'||村名 as 项目名称,pd_project_gnfl||','||pd_project_jjfl||','||PD_PROJECT_MONEY_TOTAL||','||PD_QUOTA_JJLX||','||PD_QUOTA_GLLX,0,'',0,''"; table.StrWhere = " 1=1 "; if (base.Request.Params["year"] != null) { string strWhere = table.StrWhere; table.StrWhere = strWhere + " and pd_year=" + base.Request["year"].Trim() + " and pd_project_input_company=" + ((UserModel)this.Session["user"]).Company.pk_corp; } if (base.Request.Params["pd_found_xz"] != null) { table.StrWhere = table.StrWhere + " and pd_found_xz='" + base.Request["pd_found_xz"].Trim() + "'"; } table.StrWhere = table.StrWhere + " and nvl(PD_PROJECT_ISBXK,0)=0 "; goto Label_30B8; case "proj_bianma3": { UserModel model7 = (UserModel)this.Session["User"]; string str4 = "1=0"; if (model7 != null) { str4 = base.Request.QueryString["tn"]; } str4 = ("trim(pd_project_input_company)='" + model7.Company.pk_corp.Trim() + "'") + " and PD_FOUND_XZ='" + base.Request["PD_FOUND_XZ"] + "' and nvl(PD_PROJECT_ISBXK,0)=0 "; table.PageTitle = "项目参照"; table.TableName = "v_tb_project_PD_FOUND_OUT"; table.StrWhere = str4; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,PD_PROJECT_MONEY_TOTAL||','||PD_PROJECT_MONEY_CZ_TOTAL,0,'',0,''"; goto Label_30B8; } case "proj_bianma2": { UserModel model8 = (UserModel)this.Session["User"]; string str5 = "1=0"; if (model8 != null) { str5 = "trim(pd_project_input_company)='" + model8.Company.pk_corp.Trim() + "'"; } string str9 = str5; str5 = str9 + " and pd_year=" + base.Request["pd_year"] + " and PD_FOUND_XZ='" + base.Request["ProjectType"] + "' and nvl(PD_PROJECT_ISBXK,0)=0 "; table.PageTitle = "项目参照"; table.TableName = "v_tb_project_PD_FOUND_OUT"; table.StrWhere = str5; table.Columns = "pd_project_code as PK,pd_project_name||'-'||村名 as 项目名称,PD_PROJECT_MONEY_TOTAL||','||PD_PROJECT_MONEY_CZ_TOTAL,0,'',0,''"; goto Label_30B8; } case "proj_bianma1": table.PageTitle = "项目参照"; table.TableName = "tb_project"; str6 = ""; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,pd_project_gnfl||','||pd_project_jjfl,0,'',0,''"; if (!(((UserModel)this.Session["user"]).Company.IsHasBaby == "1")) { goto Label_1813; } str6 = " pd_year=" + base.Request.Params["year"].Trim() + " and pd_project_input_company in(select pk_corp from db_company where fatherpk='" + ((UserModel)this.Session["user"]).Company.pk_corp + "')"; goto Label_1880; case "PublicReport": table.PageTitle = "参照"; table.TableName = base.Request["tb"]; table.Columns = base.Request["column"] + ",'','','',''"; table.StrWhere = base.Request["where"].Replace('"', '\''); goto Label_30B8; case "GoodsKind": table.PageTitle = "物品类别参照"; table.TableName = "GoodsKind"; table.Columns = "PK as PK,Name as 物品类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_YWLB": table.PageTitle = "业务类别参照"; table.TableName = "GOV_TC_DB_YWLB"; table.Columns = "PK as PK,Name as 业务类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; table.ShowSelect = 1; if (base.Request.QueryString["YWBH"] != null) { table.StrWhere = "PKPath like '%" + base.Request.QueryString["YWBH"].ToString() + "%' and StartSign='1'"; } goto Label_30B8; case "gov_tc_db_ywlb": table.PageTitle = "业务类别参照"; table.TableName = "GOV_TC_DB_YWLB"; table.Columns = "PK as PK,Name as 业务类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_ServicesRegister": table.PageTitle = "系统注册服务参照"; table.TableName = "GOV_TC_DB_ServicesRegister"; table.Columns = "PK as PK,Name as 注册服务名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.StrWhere = "StartSign='1'"; table.Grade = 0; if (base.Request.QueryString["showselect"] != null) { table.ShowSelect = int.Parse(base.Request.QueryString["showselect"].ToString()); } goto Label_30B8; case "GOV_TC_DB_ServicesMess_nbgl": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; table.StrWhere = table.StrWhere + " and patindex('%|'||rtrim(ServiceTypePK)||'|%','|6|12|13|')>0"; } goto Label_30B8; case "GOV_TC_DB_ServicesMess_jzjznbgl": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; table.StrWhere = table.StrWhere + " and patindex('%|'||rtrim(ServiceTypePK)||'|%','|18|19|13|')>0"; } goto Label_30B8; case "GOV_TC_DB_ServicesMess": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; if (base.Request.QueryString["servicetype"] != null) { table.StrWhere = table.StrWhere + " and ServiceTypePK='" + base.Request.QueryString["servicetype"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_UNITTYPE": table.PageTitle = "计算单位类型"; table.TableName = "GOV_TC_DB_UNITTYPE"; table.Columns = "PK as PK,Name as 计算单位类型,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_FKFS": table.PageTitle = "付款方式参照"; table.TableName = "GOV_TC_DB_FKFS"; table.Columns = "PK as PK,Name as 单位类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_TaxFeeKind_PK": table.PageTitle = "模块权限参照"; table.TableName = "GOV_TC_DB_TaxFeeKind"; table.Columns = "PK as PK,Name as 税费类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_TaxFeeKind": table.PageTitle = "税费类别参照"; table.TableName = "GOV_TC_DB_TaxFeeKind"; table.Columns = "BH as 编号,Name as 税费类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; goto Label_30B8; case "gov_tc_db_ServicesType": table.PageTitle = "服务类型参照"; table.TableName = "gov_tc_db_ServicesType"; table.Columns = "BH as PK,Name as 服务类型,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_PapersInfo": table.PageTitle = "证件档案参照"; table.TableName = "GOV_TC_DB_PapersInfo"; table.Columns = "PK as PK,Name as 证件名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_Metering": table.PageTitle = "计量计价类别参照"; table.TableName = "GOV_TC_DB_Metering"; table.Columns = "PK as PK,Name as 计量计价名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] != null) && (base.Request["PARALLELISMTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["FSTABLE"] != null) && (base.Request["FSTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "' or PARALLELISMTABLE='" + base.Request["FSTABLE"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_CollectObject": table.PageTitle = "征收对象参照"; table.TableName = "GOV_TC_DB_CollectObject"; table.Columns = "PK as PK,Name as 征收对象名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] != null) && (base.Request["PARALLELISMTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["FSTABLE"] != null) && (base.Request["FSTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "' or PARALLELISMTABLE='" + base.Request["FSTABLE"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_OprateTache": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_DB_OprateTache"; table.Columns = "PK as PK,Name as 环节名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_OprateTacheBH": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_DB_OprateTache"; table.Columns = "OPRATEORDER as PK,Name as 环节名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_OprateTache_Added": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_VIEW_SFPROCOUNTSTANDARD"; table.Columns = "distinct TACHEPK as PK,TACHE as 环节名称,0,'',0,''"; table.StrWhere = "COMPANYPK='" + this.Session["pk_corp"].ToString() + "' and TACHETYPE='11'"; goto Label_30B8; case "DB_DataTable": table.PageTitle = "数据字典——表参照"; table.TableName = "DB_DataTable"; table.Columns = "PK || '|' || TABLENAME as PK,TableRemark as 表名称,0,'',0,''"; goto Label_30B8; case "DB_DataColumn": table.PageTitle = "数据字典——列参照"; table.TableName = "DB_DataColumn"; table.Columns = "PK || '|' || COLUMNNAME as PK,COLUMNREMARK as 列名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] == null) || !(base.Request["PARALLELISMTABLE"].ToString() != "")) { goto Label_305B; } table.StrWhere = "TABLEPK='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["TABLEPK"] != null) && (base.Request["TABLEPK"].ToString() != "")) { table.StrWhere = "TABLEPK='" + base.Request["PARALLELISMTABLE"].ToString() + "' or TABLEPK " + base.Request["TABLEPK"].ToString(); } goto Label_30B8; case "GOV_TC_DB_HouseCompany": table.PageTitle = "建设单位档案参照"; table.TableName = "GOV_TC_DB_HouseCompany"; table.Columns = "PK || '|' || LegalMan || '|' || LinkType || '|' || RegisterAddress as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = "ISPASS='******'"; goto Label_30B8; case "GOV_TC_DB_BuildingCompany": table.PageTitle = "施工单位档案参照"; table.TableName = "GOV_TC_DB_BuildingCompany"; table.Columns = "PK || '|' || LegalMan || '|' || LinkType || '|' || RegisterAddress as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = "ISPASS='******'"; goto Label_30B8; case "GOV_TC_VIEW_SOILMESS": table.PageTitle = "土地档案参照"; table.TableName = "GOV_TC_DB_SOILDOCUMENT"; table.Columns = "PK||'|'||SOILSUBNUM||'|'||SOILAREA||'|'||SOILPLACE||'|'||SOILNUM as PK,SOILSUBNUM as 土地成交确认书号, Grade as 等级, FatherPK, IsHasBaby,''"; table.StrWhere = "ISPASS='******'"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_BuildProjectDocument": table.PageTitle = "建设项目档案参照"; table.TableName = "GOV_TC_VIEW_BUILDPROJECTDOC"; table.StrWhere = "ISPASS='******'"; table.Columns = "PK||'|'||ProjectName||'|'||HouseUnitHolder||'|'||HouseUnitHolderPhone||'|'||BuildAddress||'|'||SOILDOCPK||'|'||SOILSUBNUM||'|'||SOILNUM as PK,ProjectName as 项目信息, Grade as 等级, FatherPK, IsHasBaby,''"; if ((base.Request["type"] != null) && (base.Request["type"].ToString() != "")) { table.StrWhere = "ISPASS='******' and (type='" + base.Request["type"].ToString() + "' or type is null)"; } table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_BuildProjectDocument_jzs": table.PageTitle = "建设项目档案参照"; table.TableName = "GOV_TC_DB_BuildProjectDocument"; table.Columns = "PK || '|' || BuildUnitHolder || '|' || BuildUnitHolderPhone || '|' || BuildAddress as PK,ProjectName as 建设项目名称, Grade as 等级, FatherPK, IsHasBaby, ''"; table.StrWhere = "ISPASS='******'"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_ISHESHICHAJIA": table.PageTitle = "能否核实差价性质档案参照"; table.TableName = "GOV_TC_DB_ISHESHICHAJIA"; table.Columns = "PK as PK,Name as 核实性质,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_JZXZ": table.PageTitle = "建筑结构档案参照"; table.TableName = "GOV_TC_DB_JZXZ"; table.Columns = "PK as PK,Name as 建筑用途,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_PROJECTKIND": table.PageTitle = "项目性质档案参照"; table.TableName = "GOV_TC_DB_PROJECTKIND"; table.Columns = "PK as PK,Name as 项目性质,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_PAPER_BUILDSOILUSEPLAN": table.PageTitle = "建设用地规划许可证参照"; table.TableName = "GOV_TC_PAPER_BUILDSOILUSEPLAN"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROCOPY": table.PageTitle = "建设工程规划许可证副本参照"; table.TableName = "GOV_TC_PAPER_BUILDPROCOPY"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROJECTPLAN": table.PageTitle = "建设工程规划许可证正本参照"; table.TableName = "GOV_TC_PAPER_BUILDPROJECTPLAN"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROCST": table.PageTitle = "建筑工程施工许可证参照"; table.TableName = "GOV_TC_PAPER_BUILDPROCST"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_DB_STREET": table.PageTitle = "路段档案"; table.TableName = "GOV_TC_DB_STREET"; table.Columns = "PK as PK,Name as 路段名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_LDJG_HOUSE": table.PageTitle = "路段价格限制-房产"; table.TableName = "GOV_TC_DB_LDJG_HOUSE"; table.Columns = "PK || '|' || ZFMINVALUE || '|' || FZFMINVALUE as PK,TYPE||'-'||TNAME||'-'||QYFW as 路段名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_LDJG_SOIL": table.PageTitle = "路段价格限制-土地"; table.TableName = "GOV_TC_DB_LDJG_SOIL"; table.Columns = "PK || '|' || ZFMINVALUE || '|' || FZFMINVALUE as PK,TYPE||'-'||TNAME||'-'||QYFW as 路段名称,0,'',0,''"; goto Label_30B8; case "FG": table.PageTitle = "政策法规信息参照"; table.TableName = "PD_PROJECT_REGULATE"; table.Columns = "PD_PROJECT_CODE as PK,PD_PROJECT_SUBJECTS as 标题,0,'',0,''"; goto Label_30B8; case "GLLX": table.PageTitle = "支出功能信息参照"; table.TableName = "GL_Fzxzl"; table.Columns = "fzdm as PK,trim(fzdm)||'-'||fzmc as 标题,0,'',0,''"; table.StrWhere = " lbdm='4' and SFMX='1' and substr(fzdm,1,1)='2'and trim(gsdm)='" + base.Request["ye"].ToString() + "' order by fzdm"; goto Label_30B8; case "JJLX": table.PageTitle = "支出经济信息参照"; table.TableName = "GL_Fzxzl"; table.Columns = "fzdm as PK,trim(fzdm)||'-'||fzmc as 标题,0,'',0,''"; table.StrWhere = " lbdm='5'and length(trim(fzdm))=3 and trim(gsdm)='" + base.Request["ye"].ToString() + "' order by fzdm"; goto Label_30B8; case "PROJECT": table.PageTitle = "项目信息参照"; table.TableName = "tb_project"; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,0,'',0,''"; goto Label_30B8; case "INSPECTION_BTFFID": table.PageTitle = "补贴发放信息参照"; table.TableName = "PD_PROJECT_BZFFLIST"; table.Columns = "AUTO_NO as PK,PD_BZFFLIST_PEASANT_NAME||PD_BZFFLIST_IDNO as 项目名称,0,'',0,''"; goto Label_30B8; case "mssql_kjkm": table.PageTitle = "会计科目"; table.TableName = "GL_Kmxx"; table.Columns = "kmdm as PK,kmmc as 项目名称,0,'',0,''"; table.StrWhere = " gsdm='' "; goto Label_30B8; case "mssql_fzhs": table.PageTitle = "辅助核算项目"; table.TableName = "GL_Xmzl"; table.Columns = "xmdm as PK,xmmc as 项目名称,0,'',0,''"; table.StrWhere = " gsdm='' "; goto Label_30B8; case "pd_base_kaopingtype": table.PageTitle = "工作考评大类"; table.TableName = "pd_base_kaopingtype"; table.Columns = "auto_id as PK, khtypename as 考核大类 ,0,'',0,''"; goto Label_30B8; default: goto Label_30B8; } UserModel model6 = (UserModel)this.Session["User"]; table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quotaAddMoney"; table.StrWhere = " if_show=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } if ((base.Request.Params["TZJGC"] != null) && PublicDal.PageValidate.IsInt(base.Request.Params["TZJGC"])) { switch (int.Parse(base.Request.Params["TZJGC"])) { case 1: table.StrWhere = table.StrWhere + " and PD_QUOTA_LWJG<=2 "; break; case 2: table.StrWhere = table.StrWhere + " and PD_QUOTA_LWJG=3 "; break; } } if (base.Request["company_code"] != null) { table.StrWhere = table.StrWhere + " and trim(company_code)='" + model6.Company.pk_corp.Trim() + "'"; } table.Columns = " pd_quota_code as PK,ShowText as 指标文号,pd_up_money||'~'||PD_QUOTA_DEPART||'~'||PD_QUOTA_DEPART_NAME||'~'||PD_QUOTA_BASIS_JG||'~'||PD_QUOTA_ZJLY_NAME||'~'||PD_QUOTA_ZGKJ_NAME,'',''"; goto Label_30B8; Label_1813: ; str6 = " pd_year=" + base.Request.Params["year"].Trim() + " and pd_project_input_company='" + ((UserModel)this.Session["user"]).Company.pk_corp + "'"; Label_1880: if ((base.Request.Params["xz"] != null) && (base.Request.Params["xz"].Trim() != "0")) { str6 = str6 + " and pd_found_xz='" + base.Request.Params["xz"].Trim() + "'"; } table.StrWhere = str6; goto Label_30B8; Label_2FDD: companyPower = PowerClass.GetPowerString(((UserModel)HttpContext.Current.Session["User"]).CompanyPower); Label_3001: table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,'',0,''"; if (base.Request.QueryString["UsersPK"] != "admin") { table.StrWhere = "pk_corp in (" + companyPower + ")"; } goto Label_30B8; Label_305B: if ((base.Request["TABLEPK"] != null) && (base.Request["TABLEPK"].ToString() != "")) { table.StrWhere = "TABLEPK ='" + base.Request["TABLEPK"].ToString() + "'"; } Label_30B8: this.Session["UsualBookTable"] = table; } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "Page_Load()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } } }
private void DataDelete(string strPK) { try { this.mm = new MenuDal(); this.dbo = new DB_OPT(); this.dbo.Open(); this.mm = new MenuDal(); this.mm.MemuPK = strPK; this.mm.Delete(this.dbo); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); PageShowText.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.mm = new MenuDal(); if (str != "") { str = " where " + str + " "; } DataSet set = PageUsuClass.GetPageSizeData(MenuDal.GetMenuColsName(), "DB_Menu", str, "MemuPK", " order by PowerCode ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; defaultView.Sort = DataListDo.GetViewSort(); this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataTable table = new DataTable(); table = set.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); PageShowText.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void addUpdate() { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (((this.CompanyPk.Value.Trim() == "") || (this.txtBankName.Text.Trim() == "")) || (this.txtBankNum.Text.Trim() == "")) { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { this.bmd = new BankDal(); this.bmd.BankName = this.txtBankName.Text.Trim(); this.bmd.BankNum = this.txtBankNum.Text.Trim(); this.bmd.BankNumMan = this.txtBankNumMan.Text.Trim(); this.bmd.Discription = this.txtDiscription.Text.Trim(); this.bmd.pk_corp = this.CompanyPk.Value.Trim(); if (base.Request["PK"] != null) { this.bmd.BankPK = base.Request["PK"].ToString(); Const.UpdateSuccess(this.bmd.Update(this.dbo), this.Page); } else { Const.AddSuccess(this.bmd.Add(this.dbo), this.Page); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "addUpdate()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); string companyWhereZB = PublicDal.GetCompanyWhereZB(); if (str != "") { str = " where " + str + " and PD_UP_MONEY is not null " + companyWhereZB; } else { str = "where PD_UP_MONEY is not null " + companyWhereZB; } DataSet set = this.pagesize.pagesize(this.getCloumns(), "view_tb_quota_list", str, "pd_quota_code", " order by pd_quota_fwdata desc,pd_quota_depart,pd_quota_zjxz,pd_quota_zbwh ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } if (((UserModel)this.Session["User"]).Company.IsHasBaby == "0") { DataTable table = set.Tables[0]; table.Columns.Add("pd_quota_zbxdzh"); table.Columns.Add("pd_quota_ifxzhz_name"); for (int i = 0; i < table.Rows.Count; i++) { if (!string.IsNullOrEmpty(table.Rows[i]["PD_UP_MONEY"].ToString())) { this.PD_UP_MONEY += decimal.Parse(table.Rows[i]["PD_UP_MONEY"].ToString()); } } if (table.Select("PD_QUOTA_ZJXZ='项目资金'").Length > 0) { dt1 = table.Select("PD_QUOTA_ZJXZ='项目资金'").CopyToDataTable(); DataRow row1 = dt1.NewRow(); row1["pd_quota_fwdata"] = "合计"; row1["PD_UP_MONEY"] = this.PD_UP_MONEY; dt1.Rows.Add(row1); } if (table.Select("PD_QUOTA_ZJXZ='补助性资金'").Length > 0) { dt2 = table.Select("PD_QUOTA_ZJXZ='补助性资金'").CopyToDataTable(); DataRow row2 = dt2.NewRow(); row2["pd_quota_fwdata"] = "合计"; row2["PD_UP_MONEY"] = this.PD_UP_MONEY; dt2.Rows.Add(row2); } } else { DataTable table2 = set.Tables[0]; for (int j = 0; j < table2.Rows.Count; j++) { if (PublicDal.PageValidate.IsDecimal(table2.Rows[j]["PD_QUOTA_ZBXDZH"])) { this.PD_QUOTA_ZBXDZH += decimal.Parse(table2.Rows[j]["PD_QUOTA_ZBXDZH"].ToString()); } if (PublicDal.PageValidate.IsDecimal(table2.Rows[j]["PD_QUOTA_MONEY_TOTAL"])) { this.PD_QUOTA_MONEY_TOTAL += decimal.Parse(table2.Rows[j]["PD_QUOTA_MONEY_TOTAL"].ToString()); } } if (table2.Select("PD_QUOTA_ZJXZ='项目资金'").Length > 0) { dt1 = table2.Select("PD_QUOTA_ZJXZ='项目资金'").CopyToDataTable(); DataRow row1 = dt1.NewRow(); row1["pd_quota_fwdata"] = "合计"; row1["PD_QUOTA_ZBXDZH"] = this.PD_QUOTA_ZBXDZH; row1["PD_QUOTA_MONEY_TOTAL"] = this.PD_QUOTA_MONEY_TOTAL; dt1.Rows.Add(row1); } if (table2.Select("PD_QUOTA_ZJXZ='补助性资金'").Length > 0) { dt2 = table2.Select("PD_QUOTA_ZJXZ='补助性资金'").CopyToDataTable(); DataRow row2 = dt2.NewRow(); row2["pd_quota_fwdata"] = "合计"; row2["PD_QUOTA_ZBXDZH"] = this.PD_QUOTA_ZBXDZH; row2["PD_QUOTA_MONEY_TOTAL"] = this.PD_QUOTA_MONEY_TOTAL; dt2.Rows.Add(row2); } } } else { DataTable table3 = new DataTable(); table3 = set.Tables[0]; if (table3.Select("PD_QUOTA_ZJXZ='项目资金'").Length > 0) { dt1 = table3.Select("PD_QUOTA_ZJXZ='项目资金'").CopyToDataTable(); DataRow row1 = dt1.NewRow(); dt1.Rows.Add(row1); } if (table3.Select("PD_QUOTA_ZJXZ='补助性资金'").Length > 0) { dt2 = table3.Select("PD_QUOTA_ZJXZ='补助性资金'").CopyToDataTable(); DataRow row2 = dt2.NewRow(); dt2.Rows.Add(row2); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session["user"] != null) { if (base.Request["strTitle"] != null) { this.txttitle.Value = base.Server.UrlDecode(base.Request["strTitle"].ToString().Trim()); } this.Master.strTitle = this.txttitle.Value; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); this.Master.SearchHasGone = new SearchHandler(this.SearchControl); this.Master.PageNavigatorChange = new PageNavigatorHandler(this.PageChangControl); this.Master.gvGridView = this.gvResult; if (!this.Page.IsPostBack) { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; string companyPower = ((UserModel)this.Session["User"]).CompanyPower; try { ButtonsModel model = null; PublicDal.ShowListButton(this.Page, out model, ""); model.IbtDoText = "查看"; model.IfPrintNote = true; model.IbtPrintNoteText = "打印"; this.Master.btModel = model; this.ShowData(""); string currSelectedTabId = this.hidCurrentTab.Value; if (!string.IsNullOrEmpty(this.hidCurrentTab.Value)) { int tabId; if (int.TryParse(currSelectedTabId, out tabId)) { this.tabs.ActiveTabIndex = Convert.ToInt32(currSelectedTabId); } if (1 == tabId) { this.gvResult.DataSource = null; this.gvResult.DataBind(); this.tabs.ActiveTab = this.tbSource2; this.gvResult.DataSource = dt1; this.gvResult.DataBind(); this.gvResult.Attributes.Add("style", "word-break:keep-all;word-wrap:normal"); } else { this.gvResult.DataSource = null; this.tabs.ActiveTab = this.tbSource1; this.gvResult.DataSource = dt2; this.gvResult.DataBind(); this.gvResult.Attributes.Add("style", "word-break:keep-all;word-wrap:normal"); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "bind()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } } } else { Const.GoLoginPath_List(this.Page); } }
private void UpdateMenu() { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.dbo.TranFar(); if (this.txtMenuName.Text.Trim() == "") { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { string oldpath = ""; if (this.fl1.LoadFile.HasFile) { string menuUrl = ConfigMenu.MenuUrl; oldpath = ConfigMenu.MenuUrl; string str3 = Public.UpFile(base.Server.MapPath(Public.RelativelyPath(oldpath)), this.fl1.LoadFile.PostedFile); if (menuUrl != "") { oldpath = menuUrl + "/" + str3; } else { oldpath = str3; } } else { oldpath = this.fl1.ImageUrl; } MenuModel model = new MenuDal(); MenuModel model2 = new MenuDal(); model.FatherPK = this.FartherMenuPK.Value; if (model.FatherPK != "") { model.MemuPK = model.FatherPK; model = model.GetModel(false, this.dbo); if (model.IsHasBaby == "0") { model2.MemuPK = model.MemuPK; model2.UpdateHasBaby(this.dbo); } model2.PKPath = model.PKPath + model.MemuPK + "|"; if (this.txtishasbaby.Value == "1") { MenuDal.ChangeChildPkPath(base.Request.QueryString["PK"].ToString(), model2.PKPath + base.Request.QueryString["PK"].ToString() + "|", model.Grade + 2, this.dbo); } model2.Grade = model.Grade + 1; } else { model2.Grade = 0; } model2.FatherPK = this.FartherMenuPK.Value.Trim(); model2.IsHasBaby = this.txtishasbaby.Value; model2.MemuPK = base.Request.QueryString["PK"].ToString(); model2.PowerCode = this.txtfwqxbm.Text.Trim(); model2.Discription = this.txtMenuMemo.Text; model2.MenuName = this.txtMenuName.Text; model2.ImgUrl = oldpath; model2.PageUrl = this.txtMenuUrl.Text; model2.VisitPoint = int.Parse(this.txtTally.Text); model2.OrderBy = int.Parse(this.txtMenuPX.Text); model2.OpenType = this.drpdWindow.SelectedValue; model2.IsCheckPower = this.drpdPodomZT.SelectedValue; model2.IsShow = this.drpdIsList.SelectedValue; model2.MenuType = this.DrpType.SelectedValue; model2.pk_corp = HttpContext.Current.Session["pk_corp"].ToString(); model2.Update(this.dbo); this.dbo.Commit(); Const.DoSuccessClose("", this.Page); } } catch (Exception exception) { this.dbo.RollBack(); this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "UpdateMenu()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; ButtonsModel model = new ButtonsModel(userName) { IfAdd = false, IfUpdate = false, IfDelete = false, IfLook = false, IfSearch = false, IfRefresh = true, IfHuiZong = false, IfPutOut = false, IfSet = false, IfExit = true }; this.Master.btModel = model; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); if (!base.IsPostBack) { if (this.Session["user"] == null) { Const.GoLoginPath_OpenWindow(this.Page); } else { if ((base.Request["PK"] != null) && (base.Request["PK"].ToString() != "")) { model.IfSave = true; this.getTitleUpdate(); this.txtBH.ReadOnly = true; this.flog.Value = "Update"; try { this.dbo = new DB_OPT(); this.dbo.Open(); this.ubtm = new UsualBookTableDal(); this.ubtm.TableName = base.Request["tn"].ToString(); this.ubtm.PK = base.Request["PK"].ToString(); this.ubtm = this.ubtm.GetModel(true, this.dbo); this.txtBH.Text = this.ubtm.BH; this.txtname.Text = this.ubtm.Name.ToString(); this.txtDiscription.Text = this.ubtm.Discription.ToString(); this.FatherPk.Value = this.ubtm.FatherPK.Trim(); if (this.ubtm.FatherPK.ToString() != "") { DataSet set = new DataSet(); string strSql = "select * from " + base.Request["tn"].ToString() + " where pk='" + this.ubtm.FatherPK.Trim() + "'"; set = this.dbo.BackDataSet(strSql, null); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { this.txtFatherPk.Text = set.Tables[0].Rows[0]["Name"].ToString(); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "addupdate()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } } else { model.IfSave = true; this.getTitleAdd(); this.flog.Value = "add"; } if (base.Request["tn"] != null) { this.tableName.Value = base.Request["tn"].ToString(); } } } }
public void ShowData(string str) { try { string year = HttpContext.Current.Request.Cookies["YearND"].Value.ToString(); this.dbo = new DB_OPT(); this.dbo.Open(); str = " where lbdm=5 and substr(fzdm,1,1)='3' and gsdm='" + year + "'"; DataSet set = this.pagesize.pagesize(GetColsName(), "gl_fzxzl ", str, "fzdm", " order by fzdm ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataTable table = set.Tables[0]; DataColumn dc = new DataColumn(); dc.ColumnName = "LEVEL"; dc.Expression = "(len(trim(fzdm))-1)/2"; table.Columns.Add(dc); DataColumn dc2 = new DataColumn(); dc2.ColumnName = "PID"; dc2.Expression = "iif(len(trim(fzdm))=3,'0',substring(fzdm,1,len(trim(fzdm))-2))"; table.Columns.Add(dc2); DataColumn dc3 = new DataColumn(); dc3.ColumnName = "FZDMM"; dc3.Expression = "FZDM+'-'+FZMC"; table.Columns.Add(dc3); this.gvResult.DataSource = table; this.gvResult.DataBind(); } else { DataTable table3 = new DataTable(); this.gvResult.DataSource = table3.DefaultView; this.gvResult.DataBind(); } //PublicDal.setGridKeepAll(this.gvResult); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void getPageSize() { try { this.dbo = new DB_OPT(); this.cfd = new ConfigurationDal(); this.dbo.Open(); DataSet list = this.cfd.GetList("", this.dbo); if ((list != null) && (list.Tables[0].Rows.Count > 0)) { this.PageNavigator1.PageSize = int.Parse(list.Tables[0].Rows[0]["PageSizeOne"].ToString()); this.PageSize = int.Parse(list.Tables[0].Rows[0]["PageSizeOne"].ToString()); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "getPageSize()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage(" 获取数据失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public UserModel Login(string struser) { UserModel model; UserModel model2 = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model2.UserName = struser; model2.Login(dbo); ConfigurationModel model3 = new ConfigurationDal().GetModel(dbo); if (model3 != null) { HttpContext.Current.Response.Cookies["ischangelist"].Value = model3.ISCHANGELIST; HttpContext.Current.Session["common"] = model3; if (model3.ErrMessPath != "") { ExceptionLog.ExceptionLog log = new ExceptionLog.ExceptionLog { LogFilePath = model3.ErrMessPath }; } } model = model2; } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return model; }
private void DataDelete(string strPK, string bh, string name, string company, string branch) { try { new TB_PROJECT_Bll().Delete(strPK); OperationLogBll.insertOp("删除", "角色列表", "删除 " + company + " 单位, " + branch + "部门下编号为:" + bh + " 名称为:" + name + " 的角色", "Y", this.Page); if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); string companyPower = ((UserModel)this.Session["User"]).CompanyPower; if (((UserModel)this.Session["User"]).UserName.Trim() != "admin") { if (str != "") { str = " where " + str + " and pk_corp='" + this.Session["pk_corp"].ToString() + "' and patindex('%|'||rtrim(BH)||'|%','|" + companyPower + "|')>0 "; } else { str = " where pk_corp='" + this.Session["pk_corp"].ToString() + "' and patindex('%|'||rtrim(BH)||'|%','|" + companyPower + "|')>0 "; } } else if (str != "") { str = " where " + str; } DataSet set = this.pagesize.pagesize("*", "GOV_TC_VIEW_BRANCH", str, "BranchPK", " order by BH ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataRow row = set.Tables[0].NewRow(); set.Tables[0].Rows.Add(row); this.gvResult.DataSource = set.Tables[0].DefaultView; this.gvResult.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
private void DataDelete(string strPK, string bh, string name, string company, string branch) { try { if (PublicDal.IsDelete(this.Page, "TB_QUOTA", "PD_QUOTA_CODE", strPK, "PD_QUOTA_SERVERPK")) { TB_QUOTA_Bll bll = new TB_QUOTA_Bll(); TB_QUOTA_DETAIL tb_quota_detail = new TB_QUOTA_DETAIL(); if (bll.Delete(strPK)) { tb_quota_detail.DeleteProject(strPK); PageShowText.ShowMessage("删除成功!", this.Page); } else { PageShowText.ShowMessage("删除失败!", this.Page); } if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } else { PageShowText.ShowMessage("单据已进入业务流程,需删除请追回单据后再进行删除。", this.Page); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (str != "") { str = " where " + str + " "; } DataSet set = this.pagesize.pagesize("*", "DB_Role", str, "RolePK", " order by BH ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str2 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str2; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { this.rm = new RoleDal(); DataTable table = new DataTable(); table = this.rm.GetList("RolePK=''", this.dbo).Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public void ShowData(string str) { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (((str == "") && (base.Request.QueryString["pk_corp"] != null)) && (base.Request.QueryString["pk_corp"].ToString() != "")) { string str2 = base.Request.QueryString["pk_corp"].ToString(); str = " pk_corp='" + str2 + "' or FatherPK='" + str2 + "'"; } if ((str != "") && (str != null)) { str = " and " + str; } DataSet set = this.pagesize.pagesize("*", "DB_Company", " where 1=1 and pk_corp like '" + ((UserModel)this.Session["User"]).Company.pk_corp.Trim() + "%' " + str, "pk_corp", " order by pk_corp ", this.Master.PageIndex, this.Master.PageSize, out this.count); this.Master.RecordCount = Convert.ToInt32(this.count); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { DataView defaultView = set.Tables[0].DefaultView; if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null)) { string str3 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]); defaultView.Sort = str3; } this.gvResult.DataSource = defaultView; this.gvResult.DataBind(); } else { DataTable table = new DataTable(); table = set.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gvResult.DataSource = table.DefaultView; this.gvResult.DataBind(); } this.gvResult.SelectedIndex = -1; } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "ShowData()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
protected void Page_Load(object sender, EventArgs e) { if (base.Request["strTitle"] != null) { this.txttitle.Value = base.Server.UrlDecode(base.Request["strTitle"].ToString().Trim()); } this.Master.strTitle = this.txttitle.Value; this.Master.ButtonsPushDown = new ButtonsHandler(this.Buttons); this.Master.SearchHasGone = new SearchHandler(this.SearchControl); this.Master.PageNavigatorChange = new PageNavigatorHandler(this.PageChangControl); if (!this.Page.IsPostBack) { if (this.Session["user"] != null) { string userName = ((UserModel)this.Session["User"]).UserName; string power = ((UserModel)this.Session["User"]).Power; string companyPower = ((UserModel)this.Session["User"]).CompanyPower; ButtonsModel model = new ButtonsModel(userName); if (PowerClass.IfHasPower(userName, power, PowerNum.RoleList)) { try { try { string[] names = new string[] { "Name", "BH" }; DataSet searchControlDataSet = Common.GetSearchControlDataSet(names); this.Master.DataSetClo = searchControlDataSet; names[0] = "角色名称"; names[1] = "角色编号"; DataSet set2 = Common.GetSearchControlDataSet(names); this.Master.DataSetTable = set2; this.dbo = new DB_OPT(); this.dbo.Open(); this.BindList(this.dbo); if (PowerClass.IfHasPower(userName, power, PowerNum.RoleAdd)) { model.IfAdd = true; } if (PowerClass.IfHasPower(userName, power, PowerNum.RoleUpdate)) { model.IfUpdate = true; } if (PowerClass.IfHasPower(userName, power, PowerNum.RoleDelete)) { model.IfDelete = true; } model.IfLook = false; model.IfSearch = false; model.IfRefresh = true; model.IfHuiZong = false; model.IfPutOut = false; model.IfSet = false; model.IfExit = true; this.Master.btModel = model; } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "bind()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系管理员!", this.Page); } return; } finally { if (this.dbo != null) { this.dbo.Close(); } } } Const.SorryForPower(this.Page); } else { Const.GoLoginPath_List(this.Page); } } }
private void EmployeeDataBind(string strPK) { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.em = new EmployeeDal(); DataSet list = new DataSet(); list = this.em.GetList(" pk_corp='" + strPK + "'", this.dbo); if ((list != null) && (list.Tables[0].Rows.Count > 0)) { this.gv_Employee.DataSource = list; this.gv_Employee.DataBind(); } else { DataTable table = new DataTable(); table = list.Tables[0]; DataRow row = table.NewRow(); table.Rows.Add(row); this.gv_Employee.DataSource = table.DefaultView; this.gv_Employee.DataBind(); } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "EmployeeDataBind()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
private void DataDelete(string strPK, string bh, string name, string company, string branch) { try { this.dbo = new DB_OPT(); this.dbo.Open(); this.rm = new RoleDal(); this.rm.RolePK = strPK; this.rm.Delete(this.dbo); OperationLogBll.insertOp("删除", "角色列表", "删除 " + company + " 单位, " + branch + "部门下编号为:" + bh + " 名称为:" + name + " 的角色", "Y", this.Page); if (this.Master.PageIndex > 1) { this.pageind = this.Master.PageIndex; } this.ShowData(this.Master.StrSelect); } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataDelete()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }