protected void InitPage(SAInfo info) { try { SAListBLL saBll = new SAListBLL(CurrentFactoryID); tb_SA = saBll.GetDataSet("select * from CAR_Table_SAList where sn_ptr = " + did.ToString()); GridView3.DataSource = tb_SA; GridView3.DataBind(); Serial_No.Text = info.SERIALNO; CAR_Content.Text = Server.HtmlDecode(info.CAR_CONTENT); CAR_Content.AutoConfigure = CuteEditor.AutoConfigure.None; CAR_Content.ActiveTab = CuteEditor.TabType.View; CAR_Content.ShowBottomBar = false; CAR_Content.ReadOnly = true; } catch { } #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void InitPage(QSMInfo info) { try { Serial_No.Text = info.SERIALNO.Trim(); CustName.Text = info.CUST_NAME.Trim(); FactoryName.Text = info.FACTORY_NAME; Happen_Date.Text = info.HAPPEN_DATE.ToString(); cust_MaterialNo.Text = info.CUST_MATERIALNO; interalNo.Text = info.INTERALNO; require_Date.Text = info.REQUIRE_DATE.ToString(); tousu_level.Text = info.TOUSU_LEVEL; tousu_type.Text = info.TOUSU_TYPE; CAR_Content.Text = Server.HtmlDecode(info.CAR_CONTENT); chuhuo_qty.Text = info.CHUHUO_QTY.ToString(); jiancha_qty.Text = info.JIANCHA_QTY.ToString(); buliang_qty.Text = info.BULIANG_QTY.ToString(); buliangbili.Text = info.BULIANGBILI.ToString() + "%"; buliangDC.Text = info.BULIANGDC; zaixian_qty.Text = info.ZAIXIAN_QTY.ToString(); kucun_qty.Text = info.KUCUN_QTY.ToString(); try { if (Convert.ToInt32(info.TUIHUO_STATUS) == 1) { tuihuo_status_ck1.Checked = false; tuihuo_status_ck2.Checked = true; tuihuo_qty.Text = info.TUIHUO_QTY.ToString(); } else if (Convert.ToInt32(info.TUIHUO_STATUS) == 0) { tuihuo_status_ck1.Checked = true; tuihuo_status_ck2.Checked = false; } happen_address.Items.FindByValue(info.HAPPEN_ADDRESS.ToString()).Selected = true; if (Convert.ToInt32(info.TIJIAO_STATUS.ToString()) == 1) { tijiao_status_ck1.Checked = false; tijiao_status_ck2.Checked = true; switch (Convert.ToInt32(info.TIJIAO_TYPE.ToString())) { case 1: tijiao_type_ck1.Checked = true; tijiao_type_ck2.Checked = false; tijiao_type_ck3.Checked = false; break; case 2: tijiao_type_ck1.Checked = false; tijiao_type_ck2.Checked = true; tijiao_type_ck3.Checked = false; break; case 3: tijiao_type_ck1.Checked = false; tijiao_type_ck2.Checked = false; tijiao_type_ck3.Checked = true; break; } } else { tijiao_status_ck1.Checked = true; tijiao_status_ck2.Checked = false; } } catch { } notes.Text = info.NOTES; dcjiaohuo_qty.Text = info.DCJIAOHUO_QTY.ToString(); try { if (Convert.ToInt32(info.ZAITU_STATUS) == 1) { zaitu_status_ck1.Checked = false; zaitu_status_ck2.Checked = true; zaitu_qty.Text = info.ZAITU_QTY.ToString(); } else { zaitu_status_ck1.Checked = true; zaitu_status_ck2.Checked = false; } switch (Convert.ToInt32(info.ZAITUCHULI_TYPE.ToString())) { case 1: chuli_status_ck1.Checked = true; chuli_status_ck2.Checked = false; chuli_status_ck3.Checked = false; break; case 2: chuli_status_ck1.Checked = false; chuli_status_ck2.Checked = true; chuli_status_ck3.Checked = false; break; case 3: chuli_status_ck1.Checked = false; chuli_status_ck2.Checked = false; chuli_status_ck3.Checked = true; break; } if (Convert.ToInt32(info.CANGCUN_STATUS) == 1) { changleikuchun_status_ck1.Checked = false; changleikuchun_status_ck2.Checked = true; } else { changleikuchun_status_ck1.Checked = true; changleikuchun_status_ck2.Checked = false; } switch (Convert.ToInt32(info.CANGCUNCHULI_TYPE.ToString())) { case 1: chuli_type_ck1.Checked = true; chuli_type_ck2.Checked = false; chuli_type_ck3.Checked = false; chuli_type_ck4.Checked = false; break; case 2: chuli_type_ck1.Checked = false; chuli_type_ck2.Checked = true; chuli_type_ck3.Checked = false; chuli_type_ck4.Checked = false; break; case 3: chuli_type_ck1.Checked = false; chuli_type_ck2.Checked = false; chuli_type_ck3.Checked = true; chuli_type_ck4.Checked = false; break; case 4: chuli_type_ck1.Checked = false; chuli_type_ck2.Checked = false; chuli_type_ck3.Checked = false; chuli_type_ck4.Checked = true; break; } } catch { } Info_Content.Text = Server.HtmlDecode(info.INFO_CONTENT); CONF_Content.Text = Server.HtmlDecode(info.CONF_CONTENT); } catch { } #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityMediaGalleryPath(path); CONF_Content.SetSecurityFlashGalleryPath(path); CONF_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void Initialize() { #region 判断用户权限 if (!HasRight(XmlSource.GetRightIndex("BD"))) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('你没有权限进入此页面!');</script>"); Response.End(); return; } #endregion #region 初始化界面 Init_Company(1); did = String.IsNullOrEmpty(Request.QueryString["did"]) ? 0 : int.Parse(Request.QueryString["did"]); if (did > 0) { dataInfo = new CARDataBLL(CurrentFactoryID).GetByKey(did); if (dataInfo.op_type != 1) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('非法访问!');</script>"); Response.End(); return; } if (dataInfo.status == 0 || dataInfo.status == 14) //未审批、未发启 { div_AppListEdit.Style.Remove("display"); div_AppListShow.Style.Add("display", "none"); //div_AppListEdit.Visible = true; //div_AppListShow.Visible = false; #region 审批信息 ApprovalTable = new CARLogBLL(CurrentFactoryID).GetDataSet("select sp_step as 步骤,'' as 审批人,sp_user as 帐号 from CAR_Table_LOG where sn_type='' and SN_PTR=" + dataInfo.rkey.ToString() + " order by sp_step"); GridView1.DataSource = ApprovalTable; GridView1.DataBind(); #endregion } else //已经发送审批,不可更改 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; //ibtn_Cancel.Enabled = false; 取消按钮不实现任何功能 div_AppListShow.Style.Remove("display"); div_AppListEdit.Style.Add("display", "none"); //div_AppListEdit.Visible = false; //div_AppListShow.Visible = true; #region 审批信息 tb_ApprovalInfo = new CARLogBLL(CurrentFactoryID).GetDataSet("select sp_step,sp_user,sp_end_date,status,sp_content from CAR_Table_LOG where SN_PTR=" + dataInfo.rkey.ToString() + " order by sp_step"); for (int i = 0; i < tb_ApprovalInfo.Rows.Count; i++) { tb_ApprovalInfo.Rows[i][1] = GetUserName(tb_ApprovalInfo.Rows[i][1].ToString()); } GridView2.DataSource = tb_ApprovalInfo; GridView2.DataBind(); #endregion } #region 申请信息 Required_Date.Text = dataInfo.required_date.ToString(); try { Serial_No.Items.FindByText(dataInfo.serial_no).Selected = true; } catch { } Happen_Date.Text = dataInfo.happen_date.ToString(); From_Comp.Items.FindByText(dataInfo.from_comp).Selected = true; CAR_Comp.Items.FindByText(dataInfo.car_comp).Selected = true; Issued_User.Text = dataInfo.issued_user; Issued_APP.Text = dataInfo.issued_app; Received_User.Text = dataInfo.received_user; CAR_Content.Text = Server.HtmlDecode(dataInfo.car_content); #endregion } #endregion #region 根据权限来控制页面功能 if (!HasRight(XmlSource.GetRightIndex("EDIT"))) { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } if (did > 0) { if (dataInfo.nowuser != CurrentUser.UserADAcount && !CurrentUser.RightIsAdmin)//如果当前用户不是发启人,就只能查看 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } } #endregion #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void Initialize() { lnk_CSS.Href = Request.Path.Substring(0, Request.Path.LastIndexOf('/')) + "/CSS/GV.css"; #region 判断用户权限 if (!HasRight(XmlSource.GetRightIndex("SA"))) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('你没有权限进入此页面!');</script>"); Response.End(); return; } #endregion #region 初始化界面 did = String.IsNullOrEmpty(Request.QueryString["did"]) ? 0 : int.Parse(Request.QueryString["did"]); #region gridview3数据绑定 tb_SA = new CARDataBLL(CurrentFactoryID).GetDataSet("select * from CAR_Table_SAList where sn_ptr = " + did.ToString()); if (tb_SA.Rows.Count < row_Number) { for (int i = 0; i < row_Number - tb_SA.Rows.Count;) { DataRow row = tb_SA.NewRow(); for (int j = 0; j < tb_SA.Columns.Count; j++) { row[j] = DBNull.Value; } tb_SA.Rows.Add(row); } } GridView3.DataSource = tb_SA; GridView3.DataBind(); #endregion if (did > 0) { saInfo = new SABLL(CurrentFactoryID).getSAInfoByrkey(did); CAR_Content.Text = Server.HtmlDecode(saInfo.CAR_CONTENT); CAR_Content.ActiveTab = CuteEditor.TabType.View; if (saInfo.STATUS != 0 && saInfo.STATUS != 14)//审批中或审批完成 { CAR_Content.AutoConfigure = CuteEditor.AutoConfigure.None; CAR_Content.ShowBottomBar = false; } if (saInfo.STATUS == 0 || saInfo.STATUS == 14) //未审批、未发启或审批拒绝 { div_AppListEdit.Visible = true; #region 审批信息 ApprovalTable = new CARLogBLL(CurrentFactoryID).GetDataSet("select sp_step as 步骤,'' as 审批人,sp_user as 帐号 from CAR_Table_LOG where sn_type = 'SA' and SN_PTR=" + saInfo.RKEY.ToString() + " order by sp_step"); for (int i = 0; i < ApprovalTable.Rows.Count; i++) { ApprovalTable.Rows[i][1] = GetUserName(ApprovalTable.Rows[i][2].ToString()); } GridView1.DataSource = ApprovalTable; GridView1.DataBind(); #endregion } else //已经发送审批,不可更改 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; div_AppListEdit.Visible = false; } #region 申请信息 #endregion } #endregion #region 根据权限来控制页面功能 if (!HasRight(XmlSource.GetRightIndex("EDIT"))) { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } if (did > 0) { if (saInfo.ENT_USER != CurrentUser.UserADAcount && !CurrentUser.RightIsAdmin)//如果当前用户不是发启人,就只能查看 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } } #endregion #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void InitPage(DataInfo info) { Init_Company(1); CAR_Content.AutoConfigure = CuteEditor.AutoConfigure.None; try { Required_Date.Text = info.required_date.ToString(); Serial_No.Text = info.serial_no; Happen_Date.Text = info.happen_date.ToString(); From_Comp.Items.FindByText(info.from_comp).Selected = true; CAR_Comp.Items.FindByText(info.car_comp).Selected = true; Issued_User.Text = info.issued_user; Issued_APP.Text = info.issued_app; Received_User.Text = info.received_user; CAR_Content.Text = Server.HtmlDecode(info.car_content); CAR_Content.AutoConfigure = CuteEditor.AutoConfigure.None; CAR_Content.ActiveTab = CuteEditor.TabType.View; CAR_Content.ShowBottomBar = false; Interim_Action.Text = Server.HtmlDecode(info.interim_action); IA_Date.Text = info.ia_date.ToString(); Info_Content.Text = Server.HtmlDecode(info.info_content); Info_Date.Text = info.Info_Date.ToString(); Corrective_Action.Text = Server.HtmlDecode(info.corrective_action); CA_Date.Text = info.ca_date.ToString(); IPCA.Text = Server.HtmlDecode(info.ipca); IPCA_Date.Text = info.ipca_date.ToString(); ATPR.Text = Server.HtmlDecode(info.atpr); ATPR_Date.Text = info.ipca_date.ToString(); CONF_Content.Text = Server.HtmlDecode(info.conf_content); if ((int)info.sop_status == 1) { SOP_Status_ck_2.Checked = true; SOP_Name.Text = info.sop_name; } else { SOP_Status_ck_1.Checked = true; SOP_Name.Text = ""; } Z_APP.Text = info.z_app; Z_User.Text = info.z_user; SOP_Date.Text = info.sop_date.ToString(); CONF_User.Text = info.conf_user; CONF_User_Date.Text = info.conf_user_date.ToString(); CONF_APP.Text = info.conf_app; CONF_APP_Date.Text = info.conf_app_date.ToString(); } catch (Exception ex) { } #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); Interim_Action.SetSecurityImageGalleryPath(path); Interim_Action.SetSecurityImageGalleryPath(path); Interim_Action.SetSecurityMediaGalleryPath(path); Interim_Action.SetSecurityFlashGalleryPath(path); Interim_Action.SetSecurityFilesGalleryPath(path); Info_Content.SetSecurityImageGalleryPath(path); Info_Content.SetSecurityImageGalleryPath(path); Info_Content.SetSecurityMediaGalleryPath(path); Info_Content.SetSecurityFlashGalleryPath(path); Info_Content.SetSecurityFilesGalleryPath(path); Corrective_Action.SetSecurityImageGalleryPath(path); Corrective_Action.SetSecurityImageGalleryPath(path); Corrective_Action.SetSecurityMediaGalleryPath(path); Corrective_Action.SetSecurityFlashGalleryPath(path); Corrective_Action.SetSecurityFilesGalleryPath(path); IPCA.SetSecurityImageGalleryPath(path); IPCA.SetSecurityImageGalleryPath(path); IPCA.SetSecurityMediaGalleryPath(path); IPCA.SetSecurityFlashGalleryPath(path); IPCA.SetSecurityFilesGalleryPath(path); ATPR.SetSecurityImageGalleryPath(path); ATPR.SetSecurityImageGalleryPath(path); ATPR.SetSecurityMediaGalleryPath(path); ATPR.SetSecurityFlashGalleryPath(path); ATPR.SetSecurityFilesGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityMediaGalleryPath(path); CONF_Content.SetSecurityFlashGalleryPath(path); CONF_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void InitPage(DataInfo info) { Init_Company(1); try { happen_date.Text = info.happen_date.ToString(); Issued_User.Text = info.issued_user; Required_Date.Text = info.required_date.ToString(); CAR_Part_Num.Text = info.car_part_num; From_Comp.Items.FindByText(info.from_comp).Selected = true; CAR_Comp.Items.FindByText(info.car_comp).Selected = true; if (info.hsf_happen_type == "1") { HSF_Happen_Type_1.Checked = true; } else if (info.hsf_happen_type == "2") { HSF_Happen_Type_2.Checked = true; } else if (info.hsf_happen_type == "3") { HSF_Happen_Type_3.Checked = true; } else if (info.hsf_happen_type == "4") { HSF_Happen_Type_4.Checked = true; } else if (info.hsf_happen_type == "5") { HSF_Happen_Type_5.Checked = true; } Serial_No.Text = info.serial_no; Issued_APP.Text = info.issued_app; Received_User.Text = info.received_user; CAR_Content.Text = Server.HtmlDecode(info.car_content); CAR_Content.AutoConfigure = CuteEditor.AutoConfigure.None; CAR_Content.ActiveTab = CuteEditor.TabType.View; CAR_Content.ShowBottomBar = false; LOT.Text = info.lot; batch.Text = info.batch.ToString(); badness_Num.Text = info.badness_num.ToString(); ReWork.Text = info.rework.ToString(); Reject.Text = info.reject.ToString(); NoWork.Text = info.nowork.ToString(); if ((int)info.info_type_1 == 1) { Info_Type_1.Checked = true; } if ((int)info.info_type_2 == 1) { Info_Type_2.Checked = true; } if ((int)info.info_type_3 == 1) { Info_Type_3.Checked = true; } if ((int)info.info_type_4 == 1) { Info_Type_4.Checked = true; } if ((int)info.info_type_5 == 1) { Info_Type_5.Checked = true; } Info_Content.Text = Server.HtmlDecode(info.info_content); Interim_Action.Text = Server.HtmlDecode(info.interim_action); IA_APP.Text = info.IA_APP; IA_User.Text = info.IA_USER; IA_Date.Text = info.ia_date.ToString(); IPCA.Text = Server.HtmlDecode(info.ipca); IPCA_APP.Text = info.IPCA_APP; IPCA_User.Text = info.IPCA_USER; IPCA_Date.Text = info.ipca_date.ToString(); Levels.Text = info.levels; if ((int)info.sop_status == 1) { SOP_Status_2.Checked = true; SOP_Name.Text = info.sop_name; } else { SOP_Status_1.Checked = true; } SOP_Content.Text = info.sop_content; SOP_Date.Text = info.sop_date.ToString(); Together_Write.Text = info.together_write; if ((int)info.conf_status == 1) { CONF_Status_1.Checked = true; CONF_Status_2.Checked = false; CONF_Status_3.Checked = false; } else if ((int)info.conf_status == 2) { CONF_Status_1.Checked = false; CONF_Status_2.Checked = true; CONF_Status_3.Checked = false; } else if ((int)info.conf_status == 3) { CONF_Status_1.Checked = false; CONF_Status_2.Checked = false; CONF_Status_3.Checked = true; } CONF_Content.Text = Server.HtmlDecode(info.conf_content); } catch { } #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); Interim_Action.SetSecurityImageGalleryPath(path); Interim_Action.SetSecurityImageGalleryPath(path); Interim_Action.SetSecurityMediaGalleryPath(path); Interim_Action.SetSecurityFlashGalleryPath(path); Interim_Action.SetSecurityFilesGalleryPath(path); Info_Content.SetSecurityImageGalleryPath(path); Info_Content.SetSecurityImageGalleryPath(path); Info_Content.SetSecurityMediaGalleryPath(path); Info_Content.SetSecurityFlashGalleryPath(path); Info_Content.SetSecurityFilesGalleryPath(path); IPCA.SetSecurityImageGalleryPath(path); IPCA.SetSecurityImageGalleryPath(path); IPCA.SetSecurityMediaGalleryPath(path); IPCA.SetSecurityFlashGalleryPath(path); IPCA.SetSecurityFilesGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityImageGalleryPath(path); CONF_Content.SetSecurityMediaGalleryPath(path); CONF_Content.SetSecurityFlashGalleryPath(path); CONF_Content.SetSecurityFilesGalleryPath(path); #endregion }
protected void Initialize() { #region 判断用户权限 if (!HasRight(XmlSource.GetRightIndex("QSM"))) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('对不起,你没有权限访问此页面!');</script>"); Response.End(); return; } #endregion #region 初始化界面 did = String.IsNullOrEmpty(Request.QueryString["did"]) ? 0 : int.Parse(Request.QueryString["did"]); if (did > 0) { QSMInfo qsminfo = new QSMBLL(CurrentFactoryID).getQSMInfoByrkey(did); if (qsminfo.STATUS == 0 || qsminfo.STATUS == 14) //未审批、未发启 注意:不显示gridview2(审批记录) { div_AppListEdit.Visible = true; div_AppListShow.Visible = false; #region 审批信息 ApprovalTable = new CARLogBLL(CurrentFactoryID).GetDataSet("select sp_step as 步骤,'' as 审批人,sp_user as 帐号 from CAR_Table_LOG where SN_PTR=" + qsminfo.RKEY.ToString() + " and sn_type = 'QSM' order by sp_step"); for (int i = 0; i < ApprovalTable.Rows.Count; i++) { ApprovalTable.Rows[i][1] = GetUserName(ApprovalTable.Rows[i][2].ToString()); } GridView1.DataSource = ApprovalTable; GridView1.DataBind(); #endregion } else //已经发送审批,不可更改 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; //ibtn_Cancel.Enabled = false; 取消按钮不实现任何功能 div_AppListEdit.Visible = false; div_AppListShow.Visible = false; #region 审批信息 tb_ApprovalInfo = new CARLogBLL(CurrentFactoryID).GetDataSet("select sp_step,sp_user,sp_end_date,status,sp_content from CAR_Table_LOG where SN_PTR=" + qsminfo.RKEY.ToString() + " and sn_type = 'QSM' order by sp_step"); GridView2.DataSource = tb_ApprovalInfo; GridView2.DataBind(); #endregion } #region 申请信息 Serial_No.Text = qsminfo.SERIALNO; CustName.Text = qsminfo.CUST_NAME; CustCode.Value = qsminfo.CUST_CODE; factoryList.Items.FindByText(qsminfo.FACTORY_NAME).Selected = true; Happen_Date.Text = qsminfo.HAPPEN_DATE.ToString(); cust_MaterialNo.Text = qsminfo.CUST_MATERIALNO; interalNo.Text = qsminfo.INTERALNO; require_Date.Text = qsminfo.REQUIRE_DATE.ToString(); CAR_Content.Text = Server.HtmlDecode(qsminfo.CAR_CONTENT); chuhuo_qty.Text = qsminfo.CHUHUO_QTY.ToString(); jiancha_qty.Text = qsminfo.JIANCHA_QTY.ToString(); buliang_qty.Text = qsminfo.BULIANG_QTY.ToString(); buliangbili.Text = qsminfo.BULIANGBILI.ToString() + "%"; buliangDC.Text = qsminfo.BULIANGDC; zaixian_qty.Text = qsminfo.ZAITU_QTY.ToString(); kucun_qty.Text = qsminfo.KUCUN_QTY.ToString(); try { tousu_level.Items.FindByText(qsminfo.TOUSU_LEVEL).Selected = true; } catch { } try { tousu_type.Items.FindByText(qsminfo.TOUSU_TYPE).Selected = true; } catch { } if (Convert.ToInt32(qsminfo.TUIHUO_STATUS) == 0) { tuihuo_status_ck1.Checked = true; tuihuo_status_ck2.Checked = false; tuihuo_qty.Text = "0"; } else if (Convert.ToInt32(qsminfo.TUIHUO_STATUS) == 1) { tuihuo_status_ck1.Checked = false; tuihuo_status_ck2.Checked = true; tuihuo_qty.Text = qsminfo.TUIHUO_QTY.ToString(); } try { happen_address.Items.FindByValue(qsminfo.HAPPEN_ADDRESS.ToString()).Selected = true; } catch { } if (Convert.ToInt32(qsminfo.TIJIAO_STATUS) == 0) { tijiao_status_ck1.Checked = true; tijiao_status_ck2.Checked = false; } else if (Convert.ToInt32(qsminfo.TIJIAO_STATUS) == 1) { tijiao_status_ck1.Checked = false; tijiao_status_ck2.Checked = true; if (Convert.ToInt32(qsminfo.TIJIAO_TYPE) == 1) { tijiao_type_ck1.Checked = true; tijiao_type_ck2.Checked = false; tijiao_type_ck3.Checked = false; } else if (Convert.ToInt32(qsminfo.TIJIAO_TYPE) == 2) { tijiao_type_ck1.Checked = false; tijiao_type_ck2.Checked = true; tijiao_type_ck3.Checked = false; } else if (Convert.ToInt32(qsminfo.TIJIAO_TYPE) == 3) { tijiao_type_ck1.Checked = false; tijiao_type_ck2.Checked = false; tijiao_type_ck3.Checked = true; } } notes.Text = qsminfo.NOTES; #endregion } else //新建QSM { tuihuo_status_ck2.Checked = true; happen_address.Items[0].Selected = true; tijiao_status_ck2.Checked = true; tijiao_type_ck1.Checked = true; } #endregion #region 根据权限来控制页面功能 if (!HasRight(XmlSource.GetRightIndex("EDIT"))) { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } if (did > 0) { if (qsminfo.ENT_USER != CurrentUser.UserADAcount && !CurrentUser.RightIsAdmin)//如果当前用户不是发启人,就只能查看 { sendApproval.Enabled = false; ibtn_Save.Enabled = false; } } #endregion #region 文件路径 string id = System.Web.HttpContext.Current.User.Identity.Name.Replace("FOUNDERPCB\\", ""); id = id + @"/" + System.DateTime.Now.Date.ToShortDateString(); //Response.Write("id" + id); //建立用户目录 string path = Server.MapPath(@"uploads/" + id); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path);//在指定路径下新建一个文件夹 } CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityImageGalleryPath(path); CAR_Content.SetSecurityMediaGalleryPath(path); CAR_Content.SetSecurityFlashGalleryPath(path); CAR_Content.SetSecurityFilesGalleryPath(path); #endregion }