private void display明細(特販審核 p_code) { _txt業代說明.Text = p_code.SalesMemo; //_txt課長說明.Text = p_code.ChiefMemo; _txt所長說明.Text = p_code.ManagerMemo; try { _chklist批示.SelectedValue = p_code.Status; } catch { } if ("3".Equals(p_code.Status) || "4".Equals(p_code.Status)) { _btn取消.Visible = true; } else { _btn取消.Visible = false; } Session.Add("StatusBySearch", p_code.Status); _txtDate.Text = p_code.RecordDate; _txt支援金額.Text = p_code.SupportAmt.ToString(); try { _chklist非一般申請種類.SelectedValue = p_code.saletype; _chklist特別獎勵.SelectedValue = p_code.otherprize; } catch { } _txt車輛部說明.Text = p_code.CarCenterMemo; _lbl申請日.Text = p_code.OrderDate; _lbl對象.Text = p_code.sendman; }
private void display明細(特販審核 p_code) { _txt業代說明.Text = p_code.SalesMemo; //_txt課長說明.Text = p_code.ChiefMemo; _txt所長說明.Text = p_code.ManagerMemo; _txtDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); _lbl對象.Text = p_code.ChiefMemo; _lbl申請日.Text = p_code.OrderDate; CUser l_user = Session[SealedGlobalPage.SESSIONKEY_LOGIN_USER_DATA_CARSALE] as CUser; if (l_user == null) { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('請重新登入');", true); Response.Redirect("./FrmLogin.aspx"); } if (l_user.f_lvl等級 == 3) { _lbl部長.Visible = true; _chklist是否到部長.Visible = false; } else { _lbl部長.Visible = false; _chklist是否到部長.Visible = true; } }
protected void _btn審核_Click(object sender, EventArgs e) { Panel1.Visible = true; Button l_btn = (Button)sender; GridViewRow l_row = (GridViewRow)l_btn.Parent.Parent; string l_custid = ((Label)l_row.Cells[4].Controls[1]).Text; Session.Add("custidBySearch", l_custid); 特販審核 l_code = _context.CFactoryManager.特販審核Factory. get特販審核Bycustid(l_custid); //CWork l_work = _context.CFactoryManager.CWorkFactory.get工單資訊By單號(l_workid); display明細(l_code); 加入顯示棒(l_row.RowIndex); }
private void display() { 特販審核 l_code = _context.CFactoryManager.特販審核Factory. get客戶資料Bycustid(Request["id"]); _lbl身分證字號.Text = l_code.CustomerId; _lbl姓名.Text = l_code.Name; _lbl生日.Text = l_code.Birthday; _lbl戶籍地址.Text = l_code.FormalAddress; _lbl郵寄地址.Text = l_code.MailAddress; _lbl發票地址.Text = l_code.InvoiceAddress; _lbl營業所.Text = l_code.BranchId + "_" + l_code.Title; _lbl業代編號.Text = l_code.EmpId + "_" + l_code.Empname; _lbl車種.Text = l_code.CarTypeName; _lbl車型.Text = l_code.CarType; _lblSFX.Text = l_code.SFX; _lbl年份.Text = l_code.YearType; _lbl訂購日.Text = l_code.OrderDate; }
protected void _btn儲存_Click(object sender, EventArgs e) { try { if (使用者輸入()) { 特販審核 l_code = _context.CFactoryManager.特販審核Factory.create特販審核(); l_code.custid = Convert.ToInt32(Session["custid"].ToString()); l_code.CarCenterMemo = _txt車輛部說明.Text.Trim(); l_code.RecordDate = _txtDate.Text.Trim(); l_code.SupportAmt = Convert.ToDouble(_txt支援金額.Text.Trim()); l_code.saletype = _chklist非一般申請種類.SelectedValue; l_code.Status = _chklist批示.SelectedValue; l_code.otherprize = _chklist特別獎勵.SelectedValue; l_code.f_issend = _chklist是否到部長.SelectedValue; CUser l_user = Session[SealedGlobalPage.SESSIONKEY_LOGIN_USER_DATA_CARSALE] as CUser; if (l_user == null) { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('請重新登入');", true); Response.Redirect("./FrmLogin.aspx"); } if ("Y".Equals(l_code.f_issend) && l_user.f_lvl等級 != 3) { _context.CFactoryManager.特販審核Factory.insertInto特販(l_code.custid, l_user.f_username姓名); l_code.Status = "3"; _context.CFactoryManager.特販審核Factory.update部長審核Bycustid(l_code); } else { if (l_user.f_lvl等級 == 3) { l_code.ChiefMemo = "部長"; } else { l_code.ChiefMemo = _lbl對象.Text; } _context.CFactoryManager.特販審核Factory.update特販審核Bycustid(l_code); } clearUI(); Panel1.Visible = false; Search(); ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('審核完成');", true); } } catch { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "ERROR", "alert('審核失敗!請檢查網路是否正常!或洽資訊室');", true); return; } }