protected void LinBtnPrint_Click(object sender, EventArgs e) { GetPrintMargin(); if (hidtype.Text.ToUpper() == "INVOICE") { //Invoice预览是否强制显示抬头 hidInvDraft.Text = "0"; DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirImport_Invoice_SP", new List <IFields>() { dal.CreateIFields(). Append("Option", "CheckInvoiceNo"). Append("inv_seed", hidID.Text) .Append("inv_IsPrinted", "1") }).GetList(); if (ds.Tables[0].Rows[0][0].ToString() == "Y") { ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y")); Session["Tishi"] = hidID.Text; lbltishi.Text = "Printed on " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/"); ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value); } else { X.Msg.Confirm("Print confirm", "Are you sure to print?", "if (buttonId == 'yes') { CompanyX.PrintConfirm(); }").Show(); } } else { ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y")); Session["Tishi"] = hidID.Text; lbltishi.Text = "Printed on " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/"); ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value); } }
protected void btnInvDraft_Click(object sender, EventArgs e) { GetPrintMargin(); hidInvDraft.Text = "1"; ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y")); Session["Tishi"] = hidID.Text; lbltishi.Text = "Printed on " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/"); ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value); }
public void btnInvDraft_Click() { GetPrintMargin(); hidInvDraft.Text = "1"; ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount1.Text), GetNums("Y")); Session["Tishi"] = hidID.Text; lbltishi.Text = "Printed on " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/"); ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], "OE", hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint1.Text); X.AddScript("$('#btnInvDraft').removeAttr('disabled')"); }
public void PrintConfirm() { bool b = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirImport_Invoice_SP", new List <IFields>() { dal.CreateIFields(). Append("Option", "UpdateInvoiceNo"). Append("inv_seed", hidID.Text). Append("code", FSecurityHelper.CurrentUserDataGET()[4] + hidsys.Text). Append("inv_STAT", FSecurityHelper.CurrentUserDataGET()[12]). Append("User", FSecurityHelper.CurrentUserDataGET()[0]) }).Update(); Session["Tishi"] = hidID.Text; ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y")); ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value); X.AddScript("window.location.reload();if(window.opener!=null){window.opener.location.reload();}"); }