protected void btnSave_Click(object sender, EventArgs e) { DataFactory dal = new DataFactory(); DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_Container_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Update") .Append("oc_CtnrNo", txtContainer.Text.ToUpper().Trim()) .Append("oc_CtnrSize", CmbSize.Value) .Append("oc_SealNo", txtSeal.Text.Trim().ToUpper()) .Append("oc_Servicemode", CmbSerMode.Value) .Append("oc_SONo", txtSO.Text.Trim().ToUpper()) .Append("oc_GWT", string.IsNullOrEmpty(txtGWT.Text)?DBNull.Value:(object)txtGWT.Text) .Append("oc_CBM", string.IsNullOrEmpty(txtCBM.Text)?DBNull.Value:(object)txtCBM.Text) .Append("oc_Piece", string.IsNullOrEmpty(txtPiece.Text)?DBNull.Value:(object)txtPiece.Text) .Append("oc_Unit", CmbUnit.Value) .Append("oc_OrderMarks", ControlBinder.GetMakeStr(txtMarks1.Text.TrimEnd().ToUpper(), 19)) .Append("oc_OrderNoOfPackage", ControlBinder.GetMakeStr(txtmarks3.Text.TrimEnd().ToUpper(), 10)) .Append("oc_OrderDescription", ControlBinder.GetMakeStr(txtMarks2.Text.TrimEnd().ToUpper(), 46)) //.Append("oc_OrderDescription",txtMarks2.Text.TrimEnd().ToUpper().Replace("\r\n","\n")) .Append("oc_Remark", txtRemark.Text.ToUpper().Replace("\r\n", "\n")) .Append("oc_STAT", FSecurityHelper.CurrentUserDataGET()[12]) .Append("oc_SYS", SYS) .Append("oc_User", FSecurityHelper.CurrentUserDataGET()[0]) .Append("oc_ToHBL", hidHBL.Text) .Append("oc_ROWID", hidID.Text) }).GetTable(); if (dt != null) { string rowID = dt.Rows[0][0].ToString(); string flag = dt.Rows[0][1].ToString(); ControlBinder.pageTitleMsg(true, "OE-C:" + txtContainer.Text, "<p class=\"success\">Status : Record Saved with <span>" + txtContainer.Text.ToUpper() + " </span> </p>", div_bottom); if (b) { b = false; X.Redirect("Container.aspx?HBL=" + Request["HBL"]); } if (flag.Trim() == "Insert") { X.Redirect("Container.aspx?ID=" + rowID + "&HBL=" + Request["HBL"]); } else { DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_Container_SP", new List <IFields>() { dal.CreateIFields() .Append("Option", "GetContainerInfo").Append("oc_ToHBL", Request["HBL"]) }).GetList(); StoreCNNO.DataSource = ds; StoreCNNO.DataBind(); } lblPiece.Text = txtPiece.Text; //lblUnit.Text = CmbUnit.Value; X.AddScript("var r = StoreUnit.getById($('#CmbUnit').val());#{lblUnit}.setValue(r.data.short);"); } else { ControlBinder.pageTitleMsg(false, "OE-C:" + txtContainer.Text.ToUpper(), "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); } }
/// <summary> /// 初始数据 /// </summary> #region 初始数据 DataBinder() Author:Micro (2011-09-05) void DataBinder() { DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Other_Brokerage_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "GetList").Append("tri_Seed", hidSeed.Text) }).GetList(); if (ds != null && ds.Tables[0].Rows.Count > 0) { labLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString(); hidLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString(); txtMAWB.Text = ds.Tables[0].Rows[0]["tri_MBL"].ToString(); txtHAWB.Text = ds.Tables[0].Rows[0]["tri_HBL"].ToString(); if (ds.Tables[0].Rows[0]["tri_VesselID"].ToString() == "0" || ds.Tables[0].Rows[0]["tri_VesselID"].ToString() == "") { cmbVesselCode.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Vessel"].ToString(); cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Voyage"].ToString(); } else { cmbVesselCode.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_VesselID"].ToString(); StoreVoyage.RemoveAll(); DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "VoyageList"). Append("sys", FSecurityHelper.CurrentUserDataGET()[12]). Append("STAT", cmbVesselCode.Text) }).GetTable(); StoreVoyage.DataSource = dt1; StoreVoyage.DataBind(); if (ds.Tables[0].Rows[0]["tri_VoyageID"].ToString() == "0" || ds.Tables[0].Rows[0]["tri_VoyageID"].ToString() == "") { cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Voyage"].ToString(); } else if (dt1 != null && dt1.Rows.Count > 0) { cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_VoyageID"].ToString(); } } CmbDeparture.setValue(ds.Tables[0].Rows[0]["tri_LocReceived"].ToString()); CmbDest.setValue(ds.Tables[0].Rows[0]["tri_LocFinal"].ToString()); txtDepartDate.Text = ds.Tables[0].Rows[0]["tri_ETD"].ToString(); txtDepL.Text = ds.Tables[0].Rows[0]["tri_LocReceivedL"].ToString(); txtDesL.Text = ds.Tables[0].Rows[0]["tri_LocFinalL"].ToString(); txtArrivalDate.Text = ds.Tables[0].Rows[0]["tri_ETA"].ToString(); txtJob.Text = ds.Tables[0].Rows[0]["tri_EReceipt"].ToString(); CmbSalesman.setValue(ds.Tables[0].Rows[0]["tri_Sales"].ToString()); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Container"].ToString())) { txtContainer.Text = ds.Tables[0].Rows[0]["tri_Container"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Remark"].ToString())) { txtMAWBRemark.Text = ds.Tables[0].Rows[0]["tri_Remark"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_GWT"].ToString())) { txtGWT.Text = ds.Tables[0].Rows[0]["tri_GWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CBM"].ToString())) { txtCBM.Text = ds.Tables[0].Rows[0]["tri_CBM"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CWT"].ToString())) { txtCWT.Text = ds.Tables[0].Rows[0]["tri_CWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Piece"].ToString())) { txtPiece.Text = ds.Tables[0].Rows[0]["tri_Piece"].ToString(); } CmbUnit.setValue(ds.Tables[0].Rows[0]["tri_Unit"].ToString()); CmbShipperCode.setValue(ds.Tables[0].Rows[0]["tri_Shipper"].ToString()); CmbShipperCode1.Text = ds.Tables[0].Rows[0]["tri_Shipper"].ToString(); CmbShipperCode_name.Text = ds.Tables[0].Rows[0]["tri_ShipperLine"].ToString(); CmbConsigneeCode.setValue(ds.Tables[0].Rows[0]["tri_Consignee"].ToString()); CmbConsigneeCode1.Text = ds.Tables[0].Rows[0]["tri_Consignee"].ToString(); CmbConsigneeCode_name.Text = ds.Tables[0].Rows[0]["tri_ConsigneeLine"].ToString(); CmbNotify1Code.setValue(ds.Tables[0].Rows[0]["tri_PartyA"].ToString()); CmbNotify1Code1.Text = ds.Tables[0].Rows[0]["tri_PartyA"].ToString(); CmbNotify1Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyALine"].ToString(); CmbNotify2Code.setValue(ds.Tables[0].Rows[0]["tri_PartyB"].ToString()); CmbNotify2Code1.Text = ds.Tables[0].Rows[0]["tri_PartyB"].ToString(); CmbNotify2Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyBLine"].ToString(); CmbCarrierCode.setValue(ds.Tables[0].Rows[0]["tri_Carrier"].ToString()); CmbCarrierCode1.Text = ds.Tables[0].Rows[0]["tri_Carrier"].ToString(); CmbCarrierCode_name.Text = ds.Tables[0].Rows[0]["tri_CarrierLine"].ToString(); CmbCoLoader.setValue(ds.Tables[0].Rows[0]["tri_CoLoader"].ToString()); CmbCoLoader1.Text = ds.Tables[0].Rows[0]["tri_CoLoader"].ToString(); CmbCoLoader_name.Text = ds.Tables[0].Rows[0]["tri_CoLoaderLine"].ToString(); if (ControlBinder.IsDisplayLotNo(txtJob.Text.Trim(), hidLotNo.Text)) { btnUpdateLotNo.Show(); } else { btnUpdateLotNo.Hide(); } if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y") { img_void.Style.Value = "display:none"; } else { img_void.Style.Value = "display:inline"; btnSave.Disabled = true; btnCancel.Disabled = true; btnNext.Disabled = true; btnVoid.Text = "Active"; hidVoid.Text = "1"; btnUpdateLotNo.Hide(); } gridInvoice.GetStore().DataSource = ds.Tables[1]; gridInvoice.GetStore().DataBind(); ControlBinder.pageTitleMsg(false, "Brokerage Shipment:" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString(), "<p>Status : Edit Brokerage Shipment of <span>" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString() + "</span></p>", div_bottom); } else { txtJob.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtJob.Text = DateTime.Now.ToString("yyyy/MM/dd"); txtDepartDate.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtDepartDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); txtArrivalDate.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtArrivalDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); //CmbUnit.setValue("CTN"); ControlBinder.pageTitleMsg(false, "Brokerage Shipment:New", "<p>Status : New Blank Brokerage Shipment </p>", div_bottom); } }
private void DecodeURL() { if (Request["Sys"] != null) { sys = Request["Sys"]; } if (Request["From"] != null) { from = Server.UrlDecode(Request["From"]); if (from == "") { from = "1900/01/01"; } else { from = (string)ControlBinder.getDate(from); } } if (Request["To"] != null) { to = Server.UrlDecode(Request["To"]); if (to == "") { to = "2100/01/01"; } else { to = (string)ControlBinder.getDate(to); } } if (Request["Dest"] != null) { dest = Server.UrlDecode(Request["Dest"]); } if (Request["Sales"] != null) { sales = Server.UrlDecode(Request["Sales"]); } if (Request["Shipper"] != null) { shipper = Server.UrlDecode(Request["Shipper"]); } if (Request["Consignee"] != null) { consignee = Server.UrlDecode(Request["Consignee"]); } if (Request["JobNo"] != null) { JobNo = Server.UrlDecode(Request["JobNo"]); } if (Request["MBL"] != null) { MBL = Server.UrlDecode(Request["MBL"]); } if (Request["HBL"] != null) { HBL = Server.UrlDecode(Request["HBL"]); } if (Request["Container"] != null) { Container = Server.UrlDecode(Request["Container"]); } if (Request["Vessel"] != null) { Vessel = Server.UrlDecode(Request["Vessel"]); } if (Request["Voyage"] != null) { Voyage = Server.UrlDecode(Request["Voyage"]); } if (Request["Coloader"] != null) { coloader = Server.UrlDecode(Request["Coloader"]); } DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_Print_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "PrintList") .Append("prt_STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("prt_ReportCode", "JobReference").Append("prt_sys", sys) }).GetList(); if (ds != null && ds.Tables[0].Rows.Count > 0) { Store2.DataSource = ds.Tables[0]; Store2.DataBind(); } if (ds != null && ds.Tables[1].Rows.Count > 0) { CmbPrint.SelectedItem.Value = ds.Tables[1].Rows[0][0].ToString(); } if (ds != null && ds.Tables[2].Rows.Count > 0) { hidtop.Text = ds.Tables[2].Rows[0][0].ToString(); hidbottom.Text = ds.Tables[2].Rows[0][1].ToString(); hidleft.Text = ds.Tables[2].Rows[0][2].ToString(); hidright.Text = ds.Tables[2].Rows[0][3].ToString(); } if (ds != null && ds.Tables[3].Rows.Count > 0) { storeCopies.DataSource = ds.Tables[3]; storeCopies.DataBind(); } if (ds != null && ds.Tables.Count > 4) { if (ds.Tables[4].Rows.Count > 0) { cmbPrintCount.SelectedItem.Value = ds.Tables[4].Rows[0][0].ToString(); } } }
private void GetCategories() { ControlBinder.BindDropdownList(ddlCategory, GenericBS <Category> .GetListByCriteria(x => x.IsActive.Value), "CategoryName", "Id"); }
protected void StoreCompany_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreCompany, "CompanyList", "o"); }
public void StoreUnit_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreUnit, "UnitBinding", SYS[0].ToString()); }
public void StoreCN_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreCN, "ContainerSize"); }
public void StoreCurrInvoice_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", SYS[0].ToString()); }
private void DataBindList() { CmbUnit.setValue("PKG"); List <IFields> Getlist = new List <IFields>(); Getlist.Add(dal.CreateIFields().Append("Option", "List") .Append("seed", hidSeed.Text) .Append("o_ToMBL", Request["MBL"]) .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]) .Append("SYS", SYS) ); DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_HBL_SP", Getlist).GetList(); if (ds != null && ds.Tables[0].Rows.Count > 0) { txtHawb.Text = ds.Tables[0].Rows[0]["HBL"].ToString(); CmbService.setValue(ds.Tables[0].Rows[0]["ServiceMode"]); CmbPPD.SelectedItem.Value = ds.Tables[0].Rows[0]["PPD"].ToString(); CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"]); labImpLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString(); txtColoader.Text = ds.Tables[0].Rows[0]["ColoaderHBL"].ToString(); txtReference.Text = ds.Tables[0].Rows[0]["Reference"].ToString(); txtClearance.Text = ds.Tables[0].Rows[0]["Clearance"].ToString(); txtDO.Text = ds.Tables[0].Rows[0]["DO"].ToString(); labMBL.Text = ds.Tables[0].Rows[0]["MBL"].ToString(); CmbReceipt.setValue(ds.Tables[0].Rows[0]["Receipt"]); CmbFinalDest.setValue(ds.Tables[0].Rows[0]["FinalDest"].ToString()); chkInsurance.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Insurance"]); chkDG.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["DG"]); chkSurrender.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Surrender"]); CmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString()); CmbShipperCode.Text = ds.Tables[0].Rows[0]["ShipperName"].ToString(); CmbConsignee.setValue(ds.Tables[0].Rows[0]["Consignee"].ToString()); CmbConsignee.Text = ds.Tables[0].Rows[0]["ConsigneeName"].ToString(); CmbNotify1.setValue(ds.Tables[0].Rows[0]["Notify1"].ToString()); CmbNotify1.Text = ds.Tables[0].Rows[0]["Notify1Name"].ToString(); CmbNotify2.setValue(ds.Tables[0].Rows[0]["Notify2"].ToString()); CmbNotify2.Text = ds.Tables[0].Rows[0]["Notify2Name"].ToString(); CmbCoLoader.setValue(ds.Tables[0].Rows[0]["Coloader"].ToString()); CmbCoLoader.Text = ds.Tables[0].Rows[0]["ColoaderName"].ToString(); CmbBroker.setValue(ds.Tables[0].Rows[0]["Broker"].ToString()); CmbBroker.Text = ds.Tables[0].Rows[0]["BrokerName"].ToString(); //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString())) // txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString(); //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CWT"].ToString())) // txtCWT.Text = ds.Tables[0].Rows[0]["CWT"].ToString(); //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CBM"].ToString())) // txtCBM.Text = ds.Tables[0].Rows[0]["CBM"].ToString(); //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Piece"].ToString())) // txtPiece.Text = ds.Tables[0].Rows[0]["Piece"].ToString(); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString())) { txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["AWT"].ToString())) { txtAGWT.Text = ds.Tables[0].Rows[0]["AWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CBM"].ToString())) { txtCBM.Text = ds.Tables[0].Rows[0]["CBM"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["ACBM"].ToString())) { txtACBM.Text = ds.Tables[0].Rows[0]["ACBM"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["PKGS"].ToString())) { txtPiece.Text = ds.Tables[0].Rows[0]["PKGS"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["APKGS"].ToString())) { txtAPiece.Text = ds.Tables[0].Rows[0]["APKGS"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["WM"].ToString())) { txtCWT.Text = ds.Tables[0].Rows[0]["WM"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["AWM"].ToString())) { txtAWM.Text = ds.Tables[0].Rows[0]["AWM"].ToString(); } CmbUnit.setValue(ds.Tables[0].Rows[0]["Unit"].ToString()); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Container"].ToString())) { txtContainer.Text = ds.Tables[0].Rows[0]["Container"].ToString(); } CmbWarehouse.setValue(ds.Tables[0].Rows[0]["Warehouse"].ToString()); CmbWarehouse.Text = ds.Tables[0].Rows[0]["WarehouseName"].ToString(); txtFreeStorageStart.Text = ds.Tables[0].Rows[0]["FreeStorageStart"].ToString(); txtFreeStorageEnd.Text = ds.Tables[0].Rows[0]["FreeStorageEnd"].ToString(); txtPickUp.Text = ds.Tables[0].Rows[0]["PickUp"].ToString(); txtRemark.Text = ds.Tables[0].Rows[0]["Remark"].ToString(); GridPanelInvoice.GetStore().DataSource = ds.Tables[1]; GridPanelInvoice.GetStore().DataBind(); GridPanelContainer.GetStore().DataSource = ds.Tables[2]; GridPanelContainer.GetStore().DataBind(); if (ds.Tables[2].Rows.Count > 0) { double GWT = 0.000, Pieces = 0, CBM = 0.000, wm = 0.000; for (int i = 0; i < ds.Tables[2].Rows.Count; i++) { GWT += Convert.ToDouble(ds.Tables[2].Rows[i]["GWT"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["GWT"].ToString()); Pieces += Convert.ToDouble(ds.Tables[2].Rows[i]["PKGS"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["PKGS"].ToString()); CBM += Convert.ToDouble(ds.Tables[2].Rows[i]["CBM"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["CBM"].ToString()); wm += Convert.ToDouble(ds.Tables[2].Rows[i]["WM"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["WM"].ToString()); } if (Pieces.ToString() != "0") { txtAPiece.Text = Pieces.ToString(); } if (GWT.ToString() != "0") { txtAGWT.Text = GWT.ToString(); } if (CBM.ToString() != "0") { txtACBM.Text = CBM.ToString(); } if (wm.ToString() != "0") { txtAWM.Text = wm.ToString(); } } if (Convert.ToBoolean(ds.Tables[0].Rows[0]["active"])) { img_void.Style.Value = "display:none"; } else { img_void.Style.Value = "display:inline"; btnSave.Disabled = true; btnCancel.Disabled = true; btnNext.Disabled = true; btnVoid.Text = "Active"; hidVoid.Text = "1"; X.AddScript("$('#showContainer').hide();"); } GridPanelOther.GetStore().DataSource = ds.Tables[3]; GridPanelOther.GetStore().DataBind(); GridPanelForeign.GetStore().DataSource = ds.Tables[5]; GridPanelForeign.GetStore().DataBind(); GridPanelRoute.GetStore().DataSource = ds.Tables[6]; GridPanelRoute.GetStore().DataBind(); GridPanelContact.GetStore().DataSource = ds.Tables[7]; GridPanelContact.GetStore().DataBind(); } if (!string.IsNullOrEmpty(Request["seed"])) { ControlBinder.pageTitleMsg(false, "OI-H:" + labImpLotNo.Text, "<p>Status : Edit HBL of <span>" + labImpLotNo.Text + "</span>. </p>", div_bottom); } else { ControlBinder.pageTitleMsg(false, "OI-H New", "<p>Status : New Blank HBL . </p>", div_bottom); } txtHawb.Focus(true); }
public void StoreOP_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreOP, "GetUserListByStat"); }
public void StoreCompanyKind_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreCompanyKind, "CompanyKind", SYS[0].ToString()); }
public void binder() { ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", "O"); }
protected void btnOK_Click(object sender, EventArgs e) { string hbl = "", lotno = ""; string type = Request["Type"]; string ETD = Request["ETD"]; bool flag = true; if (type == "0" || type == "2" || type == "4") { if (rdAutoGene.Checked) { string pod = Server.UrlDecode(Request["POD"]); if (pod == "") { flag = false; X.Msg.Alert("Status", "Discharge port can't be empty!").Show(); return; } else { DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_HBL_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "MakeNo").Append("Type", "HBL").Append("User", FSecurityHelper.CurrentUserDataGET()[0]) .Append("o_STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("code", FSecurityHelper.CurrentUserDataGET()[4].ToString()) .Append("o_LocPOD", pod) .Append("o_ETD", ControlBinder.getDate(ETD.StartsWith("0001") ? DBNull.Value : (object)ETD)) }).GetList(); if (ds != null) { hbl = ds.Tables[0].Rows[0][0].ToString(); } } } else { hbl = txtManual.Text.Trim().ToUpper(); if (hbl == "") { flag = false; X.Msg.Alert("Status", "HBL can't be empty!").Show(); return; } } } if ((type == "2" || type == "3") && Request["IsTran"].ToString() != "TRUE") { if (rdNewLot.Checked) { DataSet dsLot = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_HBL_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "MakeNo").Append("Type", "LotNo").Append("User", FSecurityHelper.CurrentUserDataGET()[0]) .Append("o_STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("code", FSecurityHelper.CurrentUserDataGET()[4]) .Append("o_ETD", ControlBinder.getDate(ETD.StartsWith("0001") ? DBNull.Value : (object)ETD)) }).GetList(); if (dsLot != null) { lotno = dsLot.Tables[0].Rows[0][0].ToString(); } } else if (rdAssign.Checked) { lotno = CmbAssign.SelectedItem.Text; if (lotno == "") { flag = false; X.Msg.Alert("Status", "LotNo can't be empty!").Show(); return; } } else { lotno = txtManual1.Text.Trim().ToUpper(); if (lotno == "") { flag = false; X.Msg.Alert("Status", "LotNo can't be empty!").Show(); return; } } } if (flag == true) { //if (Request["IsTran"].ToString() == "TRUE") //{ lotno = "1"; } X.AddScript("window.parent.SetHBL('" + lotno + "','" + hbl + "','" + type + "');window.parent.winAutoHBL.close();"); } }
protected void btnSave_Click(object sender, DirectEventArgs e) { DataTable grid = JSON.Deserialize <DataTable>(e.ExtraParams["grid"]); if (gridList.Store.Count > 0) { for (int i = 0; i < grid.Rows.Count; ++i) { if (grid.Rows[i]["DODCTNS"].ToString() != "" || grid.Rows[i]["DODGW"].ToString() != "" || grid.Rows[i]["DODCBM"].ToString() != "") { DataTable dtGrid = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_DeliveryOrder_Control_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Update") .Append("IsGetSeedKey", 1) .Append("Seed", hidSeed.Text == "0"? "0" :hidSeed.Text.Trim()) .Append("DOSys", "DO") .Append("DODSys", grid.Rows[i]["DodSys"].ToString()) .Append("ToMaster", DBNull.Value) .Append("ToHouse", DBNull.Value) .Append("BookingNo", grid.Rows[i]["BookingNo"].ToString().ToUpper()) .Append("SPL", grid.Rows[i]["SPL"].ToString().ToUpper() == "TRUE" ? 1 : 0) .Append("PO", grid.Rows[i]["PO"].ToString().ToUpper()) .Append("DODShipper", grid.Rows[i]["DODShipper"].ToString().ToUpper()) .Append("Consignee", grid.Rows[i]["DODConsignee"].ToString().ToUpper()) .Append("DODCTNS", string.IsNullOrEmpty(grid.Rows[i]["DODCTNS"].ToString()) ? DBNull.Value : (object)grid.Rows[i]["DODCTNS"]) .Append("DODGW", string.IsNullOrEmpty(grid.Rows[i]["DODGW"].ToString()) ? DBNull.Value : (object)grid.Rows[i]["DODGW"]) .Append("DODCBM", string.IsNullOrEmpty(grid.Rows[i]["DODCBM"].ToString()) ? DBNull.Value : (object)grid.Rows[i]["DODCBM"]) .Append("IsOutstand", 1) .Append("IsShipment", grid.Rows[i]["BookingNo"].ToString() == "" ? 0 : 1) .Append("IsAC", 0) .Append("CrUser", FSecurityHelper.CurrentUserDataGET()[0]) .Append("LastUser", FSecurityHelper.CurrentUserDataGET()[0]) .Append("Stat", FSecurityHelper.CurrentUserDataGET()[12]) .Append("DODRemark", "") .Append("RowID", Convert.ToInt32(grid.Rows[i]["ROWID"])) }).GetTable(); if (dtGrid == null) { div_bottom.Html = "<p class='error'>Status: Saved failed , please check the grid data ! </p>"; return; } } else { div_bottom.Html = "<p class='error'> Save failed , CTNS or GW or VOL/CBM is empty!</p>"; return; } } } if (hidDelByRowId.Text != "") { string a = hidDelByRowId.Text.Substring(0, hidDelByRowId.Text.Length - 1); DataTable dtDel = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_DeliveryOrder_Control_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Delete") .Append("DeleteByRowID", a) //.Append("DOSys","DO") //.Append("Stat",FSecurityHelper.CurrentUserDataGET()[12]) }).GetTable(); if (dtDel != null && Convert.ToInt32(dtDel.Rows[0]["c"]) > 0) { div_bottom.Html = "<p class='success'>Status : Saved successful . </p>"; } else { div_bottom.Html = "<p class='error'> Delete failed , please check the data !</p>"; return; } } DataTable dtDO = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_DeliveryOrder_Control_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Update") .Append("Seed", hidSeed.Text == "0"?(object)DBNull.Value:(object)hidSeed.Text) .Append("DOSys", "DO") .Append("OrderDate", ControlBinder.getDate(string.IsNullOrEmpty(txtDate.RawText.Trim()) ? "1900/01/01" : (object)txtDate.RawText.Trim())) .Append("Company", string.IsNullOrEmpty(ACCompany.Value)? "": ACCompany.Value.Trim()) .Append("TruckType", string.IsNullOrEmpty(cmbType.Text)? "": cmbType.Text.Trim()) .Append("DOShipper", string.IsNullOrEmpty(ACShipper.Value)? "": ACShipper.Value.Trim()) .Append("Address", txtAddress.Text.Trim().ToUpper()) .Append("Pallets", string.IsNullOrEmpty(txtPallets.Text.Trim()) ? DBNull.Value : (object)txtPallets.Text.Trim()) .Append("Cost", string.IsNullOrEmpty(txtCost.Text.Trim()) ? DBNull.Value : (object)txtCost.Text.Trim()) .Append("DORemark", txtRemark.Text.Trim().ToUpper()) .Append("CrUser", FSecurityHelper.CurrentUserDataGET()[0]) .Append("LastUser", FSecurityHelper.CurrentUserDataGET()[0]) .Append("Stat", FSecurityHelper.CurrentUserDataGET()[12]) }).GetTable(); if (dtDO != null) { //hidSeed.Text = dtDO.Rows[0][0].ToString(); hidDelByRowId.Text = ""; DataBinder(); ControlBinder.pageTitleMsg(true, "DO:" + labDO.Text, "<p class='success'>Status : Saved successful . </p>", div_bottom); if (dtDO != null && dtDO.Rows.Count > 0 && hidSeed.Text == "0") { X.Redirect("List.aspx?Seed=" + dtDO.Rows[0][0].ToString()); } } else { div_bottom.Html = "<p class='error'>Status: Saved failed , please check the data ! </p>"; } }
protected void btnSave_Click(object sender, EventArgs e) { //if (string.IsNullOrEmpty(txtContainer.Text)) //{ // div_bottom.Html = "<p class=\"error\">Status : Save failed, Container can't for empty .</p>"; // txtContainer.Focus(); // return; //} DataFactory dal = new DataFactory(); DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Container_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Update") .Append("oc_CtnrNo", txtContainer.Text.ToUpper().Trim()) .Append("oc_CtnrSize", CmbSize.Value) .Append("oc_SealNo", txtSeal.Text.Trim().ToUpper()) .Append("oc_Servicemode", CmbSerMode.Value) .Append("oc_SONo", txtSO.Text.Trim().ToUpper()) .Append("oc_GWT", string.IsNullOrEmpty(txtGWT.Text)?DBNull.Value:(object)txtGWT.Text) .Append("oc_CBM", string.IsNullOrEmpty(txtCBM.Text)?DBNull.Value:(object)txtCBM.Text) .Append("oc_Piece", string.IsNullOrEmpty(txtPiece.Text)?DBNull.Value:(object)txtPiece.Text) .Append("oc_Unit", CmbUnit.Value) .Append("oc_OrderMarks", txtMarks1.Text.ToUpper().Replace("\r\n", "\n")) .Append("oc_OrderNoOfPackage", txtmarks3.Text.ToUpper().Replace("\r\n", "\n")) .Append("oc_OrderDescription", txtMarks2.Text.ToUpper().Replace("\r\n", "\n")) .Append("oc_Remark", txtRemark.Text.ToUpper().Replace("\r\n", "\n")) .Append("oc_STAT", FSecurityHelper.CurrentUserDataGET()[12]) .Append("oc_SYS", SYS) .Append("oc_User", FSecurityHelper.CurrentUserDataGET()[0]) .Append("oc_ToHBL", hidHBL.Text) .Append("oc_ROWID", hidID.Text) }).GetTable(); if (dt != null) { string rowID = dt.Rows[0][0].ToString(); string flag = dt.Rows[0][1].ToString(); ControlBinder.pageTitleMsg(true, "OI-C:" + txtContainer.Text, "<p class=\"success\">Status : Record Saved with <span>" + txtContainer.Text + " </span> </p>", div_bottom); if (b) { b = false; X.Redirect("Container.aspx?HBL=" + Request["HBL"]); return; } if (flag.Trim() == "Insert") { //X.Msg.Alert("status", " Saved successfully").Show(); X.Redirect("Container.aspx?ID=" + rowID + "&HBL=" + Request["HBL"]); } lblPiece.Text = txtPiece.Text; lblUnit.Text = CmbUnit.Value; } else { ControlBinder.pageTitleMsg(false, "OI-C:" + txtContainer.Text, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); } }
protected void btnSave_Click(object sender, DirectEventArgs e) { if (hidMAWB.Text == "-1") { ControlBinder.pageTitleMsg(false, "OI-H New", "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); return; } if (string.IsNullOrEmpty(txtHawb.Text.Trim())) { div_bottom.Html = "<p class=\"error\">Status : Save failed, HBL can't for empty . </p>"; txtHawb.Focus(true); return; } List <IFields> UpdateHBL = new List <IFields>(); UpdateHBL.Add(dal.CreateIFields().Append("Option", "UpdateHBL") .Append("Seed", hidSeed.Text) .Append("o_ToMBL", hidMAWB.Text) .Append("o_HBL", txtHawb.Text.Trim().ToUpper()) .Append("o_ServiceMode", string.IsNullOrEmpty(CmbService.Value) ? null : CmbService.Value.Trim().ToUpper()) .Append("o_PaymentMode", CmbPPD.SelectedItem.Value) .Append("o_Sales", CmbSalesman.Value) .Append("o_MBL", labMBL.Text.Trim().ToUpper()) .Append("o_ColoaderHBL", txtColoader.Text.ToUpper()) .Append("o_DONo", txtReference.Text.Trim().ToUpper()) .Append("imp_Clearance", txtClearance.Text.Trim().ToUpper()) .Append("o_DONo", txtDO.Text.Trim().ToUpper()) .Append("o_LocReceipt", CmbReceipt.Value) .Append("o_LocFinal", CmbFinalDest.Value) .Append("o_Insurance", chkInsurance.Checked) .Append("o_DG", chkDG.Checked) .Append("imp_Surrender", chkSurrender.Checked) .Append("o_Shipper", CmbShipperCode.Value) //.Append("o_Shipper", CmbShipperName.SelectedItem.Value) .Append("o_Consignee", CmbConsignee.Value) //.Append("o_Consignee", CmbConsigneeName.SelectedItem.Value) .Append("o_PartyA", CmbNotify1.Value) //.Append("o_PartyA", CmbNotify1Name.SelectedItem.Value) .Append("o_PartyB", CmbNotify2.Value) //.Append("o_PartyB", CmbNotify2Name.SelectedItem.Value) .Append("o_CoLoader", CmbCoLoader.Value) //.Append("o_CoLoader", CmbCoLoaderName.SelectedItem.Value) .Append("o_Broker", CmbBroker.Value) //.Append("o_Broker", CmbBrokerName.SelectedItem.Value) //.Append("o_WT", string.IsNullOrEmpty(txtGWT.Text) ? DBNull.Value : (object)txtGWT.Text) //.Append("o_CWT", string.IsNullOrEmpty(txtCWT.Text) ? DBNull.Value : (object)txtCWT.Text) //.Append("o_CBM", string.IsNullOrEmpty(txtCBM.Text) ? DBNull.Value : (object)txtCBM.Text) //.Append("o_PKGS", string.IsNullOrEmpty(txtPiece.Text) ? DBNull.Value : (object)txtPiece.Text) .Append("o_CWT", string.IsNullOrEmpty(txtGWT.Text) ? DBNull.Value : (object)txtGWT.Text) .Append("o_AWT", string.IsNullOrEmpty(txtAGWT.Text) ? DBNull.Value : (object)txtAGWT.Text) .Append("o_CCBM", string.IsNullOrEmpty(txtCBM.Text) ? DBNull.Value : (object)txtCBM.Text) .Append("o_ACBM", string.IsNullOrEmpty(txtACBM.Text) ? DBNull.Value : (object)txtACBM.Text) .Append("o_CPKGS", string.IsNullOrEmpty(txtPiece.Text) ? DBNull.Value : (object)txtPiece.Text) .Append("o_APKGS", string.IsNullOrEmpty(txtAPiece.Text) ? DBNull.Value : (object)txtAPiece.Text) .Append("o_CWM", string.IsNullOrEmpty(txtCWT.Text) ? DBNull.Value : (object)txtCWT.Text) .Append("o_AWM", string.IsNullOrEmpty(txtAWM.Text) ? DBNull.Value : (object)txtAWM.Text) .Append("o_Unit", CmbUnit.Value) .Append("o_CarrierATTN", string.IsNullOrEmpty(txtContainer.Text) ? DBNull.Value : (object)txtContainer.Text) .Append("imp_Warehouse", CmbWarehouse.Value) //.Append("imp_Warehouse", CmbWarehouseName.SelectedItem.Value) .Append("imp_StorageFrom", ControlBinder.getDate(txtFreeStorageStart.RawText.StartsWith("0001") ? DBNull.Value : (object)txtFreeStorageStart.RawText)) .Append("imp_StorageTo", ControlBinder.getDate(txtFreeStorageEnd.RawText.StartsWith("0001") ? DBNull.Value : (object)txtFreeStorageEnd.RawText)) .Append("imp_PickupDate", ControlBinder.getDate(txtPickUp.RawText.StartsWith("0001") ? DBNull.Value : (object)txtPickUp.RawText)) .Append("o_Remark", txtRemark.Text.Trim()) .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("SYS", SYS) .Append("code", FSecurityHelper.CurrentUserDataGET()[4].ToString() + SYS) .Append("User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) ); #region ///Container //var Container = JSON.Deserialize<List<gridContainer>>(e.ExtraParams["p_safety_6"]); //string conRowID = ""; //for (int i = 0; i < Container.Count; ++i) //{ // conRowID += "," + Container[i].RowID; //} //if (conRowID.Length > 1) //{ // conRowID = conRowID.Substring(1, conRowID.Length - 1); //} //dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Container_SP", new List<IFields> { dal.CreateIFields().Append("Option", "DeleteActual").Append("oc_Seed", hidSeed.Text).Append("IDList", conRowID) }).Update(); #endregion DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_HBL_SP", UpdateHBL).GetList(); hidSeed.Text = ds.Tables[0].Rows[0][0].ToString(); string newFlag = ds.Tables[0].Rows[0][1].ToString(); #region /// Local Invoice //var localInvoice = JSON.Deserialize<List<gridContainer>>(e.ExtraParams["p_safety_7"]); //string invRowID = ""; //for (int i = 0; i < localInvoice.Count; ++i) //{ // invRowID += "," + localInvoice[i].RowID; //} //if (invRowID.Length > 1) //{ // invRowID = invRowID.Substring(1, invRowID.Length - 1); //} //dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Invoice_SP", new List<IFields> { dal.CreateIFields().Append("Option", "DeleteActualLocal").Append("inv_Seed", hidSeed.Text).Append("str", invRowID) }).Update(); #endregion #region Other var Other = JSON.Deserialize <List <Other> >(e.ExtraParams["p_safety_l"]); List <IFields> Otherlist = new List <IFields>(); string OtherID = ""; for (int i = 0; i < Other.Count; ++i) { Otherlist.Add(dal.CreateIFields().Append("Option", "UpdateOther"). Append("si_PPCC", Other[i].PPD). Append("si_BillTo", Other[i].CompanyCode.ToUpper()). //Append("si_BillTo", Other[i].CompanyName). Append("si_Total", string.IsNullOrEmpty(Other[i].Total) ? DBNull.Value : (object)Other[i].Total). Append("si_Item", Other[i].Item.Trim().ToUpper()). Append("si_Description", Other[i].Description.Trim().ToUpper()). Append("si_QtyKind", Other[i].CalcKind.Trim().ToUpper()). Append("si_Quantity", string.IsNullOrEmpty(Other[i].Qty) ? DBNull.Value : (object)Other[i].Qty). Append("si_Unit", Other[i].Unit.ToUpper()). Append("si_Currency", Other[i].Currency.ToUpper()). Append("si_ExRate", string.IsNullOrEmpty(Other[i].EX) ? DBNull.Value : (object)Other[i].EX). Append("si_Rate", string.IsNullOrEmpty(Other[i].Rate) ? DBNull.Value : (object)Other[i].Rate). Append("si_Amount", string.IsNullOrEmpty(Other[i].Amount) ? DBNull.Value : (object)Other[i].Amount). Append("si_Percent", string.IsNullOrEmpty(Other[i].Percent) ? DBNull.Value : (object)Other[i].Percent). Append("si_ShowIn", Other[i].Show.ToUpper()). Append("si_ROWID", Other[i].RowID) .Append("si_ToHouse", hidSeed.Text) .Append("si_Stat", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("si_Sys", SYS) .Append("si_User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) ); OtherID += "," + Other[i].RowID; } //delete if (OtherID.Length > 1) { OtherID = OtherID.Substring(1, OtherID.Length - 1); } dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentItem_SP", new List <IFields> { dal.CreateIFields().Append("Option", "DeleteActual").Append("si_Seed", hidSeed.Text).Append("si_Type", "OTHER").Append("str", OtherID) }).Update(); bool resultOther = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentItem_SP", Otherlist).Update(); #endregion #region Costing //X.AddScript("saveCost('" + hidSeed.Text + "');"); ucCost.costseed = hidSeed.Text; ucCost.btnCostEvent(sender, e); #endregion #region ForeignInvoice var ForeignInvoice = JSON.Deserialize <List <ForeignInvoice> >(e.ExtraParams["p_safety_3"]); List <IFields> ForeignInvoicelist = new List <IFields>(); string ForeignInvoiceID = ""; for (int i = 0; i < ForeignInvoice.Count; ++i) { ForeignInvoicelist.Add(dal.CreateIFields().Append("Option", "Update"). Append("inv_Payment", ForeignInvoice[i].Kind). Append("inv_InvoiceDate", ControlBinder.getDate(ForeignInvoice[i].Date.ToString().StartsWith("0001") ? DBNull.Value : (object)ForeignInvoice[i].Date)). Append("inv_InvoiceNo", ForeignInvoice[i].DN_CNNO.ToUpper()). Append("inv_CompanyCode", ForeignInvoice[i].CompanyCode). Append("inv_CompanyName", ForeignInvoice[i].CompanyName). Append("inv_Currency", ForeignInvoice[i].Currency). Append("inv_Total", string.IsNullOrEmpty(ForeignInvoice[i].Amount) ? DBNull.Value : (object)ForeignInvoice[i].Amount). Append("inv_RowID", ForeignInvoice[i].RowID) .Append("inv_ToHouse", hidSeed.Text) .Append("inv_Stat", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("inv_Sys", SYS) .Append("inv_User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) ); ForeignInvoiceID += "," + ForeignInvoice[i].RowID; } //delete if (ForeignInvoiceID.Length > 1) { ForeignInvoiceID = ForeignInvoiceID.Substring(1, ForeignInvoiceID.Length - 1); } dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Invoice_SP", new List <IFields> { dal.CreateIFields().Append("Option", "DeleteActual").Append("inv_Seed", hidSeed.Text).Append("str", ForeignInvoiceID) }).Update(); bool resultForeignInvoice = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Invoice_SP", ForeignInvoicelist).Update(); #endregion #region Domestic var Domestic = JSON.Deserialize <List <Domestic> >(e.ExtraParams["p_safety_4"]); List <IFields> Domesticlist = new List <IFields>(); string DomesticID = ""; for (int i = 0; i < Domestic.Count; ++i) { Domesticlist.Add(dal.CreateIFields().Append("Option", "Update"). Append("sr_ShipKind", Domestic[i].Kind). Append("sr_Carrier", Domestic[i].CompanyCode). //Append("sr_Carrier", Domestic[i].CompanyName). Append("sr_To", Domestic[i].Dest). Append("sr_Voyage", Domestic[i].Voyage.ToUpper()). Append("sr_ETD", ControlBinder.getDate(Domestic[i].ETD.ToString().StartsWith("0001") ? DBNull.Value : (object)Domestic[i].ETD)). Append("sr_ETA", ControlBinder.getDate(Domestic[i].ETA.ToString().StartsWith("0001") ? DBNull.Value : (object)Domestic[i].ETA)). Append("sr_RowID", Domestic[i].RowID) .Append("sr_ToHouse", hidSeed.Text) .Append("sr_Stat", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("sr_Sys", SYS) .Append("sr_User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) ); DomesticID += "," + Domestic[i].RowID; } //delete if (DomesticID.Length > 1) { DomesticID = DomesticID.Substring(1, DomesticID.Length - 1); } dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentRoute_SP", new List <IFields> { dal.CreateIFields().Append("Option", "DeleteActual").Append("sr_Seed", hidSeed.Text).Append("str", DomesticID) }).Update(); bool resultLocalDeliveryRoute = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentRoute_SP", Domesticlist).Update(); #endregion #region Contact var ContactInformation = JSON.Deserialize <List <Contact> >(e.ExtraParams["p_safety_5"]); List <IFields> ContactInformationlist = new List <IFields>(); string ContactinformationID = ""; for (int i = 0; i < ContactInformation.Count; ++i) { ContactInformationlist.Add(dal.CreateIFields().Append("Option", "Update"). Append("sc_Type", ContactInformation[i].Kind.ToUpper()). Append("sc_Company", ContactInformation[i].CompanyCode.ToUpper()). //Append("sc_Company", ContactInformation[i].CompanyName). Append("sc_Dept", ContactInformation[i].Dept.ToUpper()). Append("sc_RowID", ContactInformation[i].RowID) .Append("sc_ToHouse", hidSeed.Text) .Append("sc_Stat", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("sc_Sys", SYS) .Append("sc_User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) ); ContactinformationID += "," + ContactInformation[i].RowID; } //delete if (ContactinformationID.Length > 1) { ContactinformationID = ContactinformationID.Substring(1, ContactinformationID.Length - 1); } dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentContact_SP", new List <IFields> { dal.CreateIFields().Append("Option", "DeleteActual").Append("sc_Seed", hidSeed.Text).Append("str", ContactinformationID) }).Update(); bool resultContactInformation = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_ShipmentContact_SP", ContactInformationlist).Update(); #endregion //update cost(Qty,unit,total) //ControlBinder.UpdateCostData(hidSeed.Text, "OI", "HBL"); if (newFlag == "Y") { if (!b) { X.Redirect("OceanShipmentHouse.aspx?seed=" + ds.Tables[0].Rows[0][0] + "&MBL=" + hidMAWB.Value); } else { X.Redirect("OceanShipmentHouse.aspx?MBL=" + Request["MBL"]); } } else if (b) { X.Redirect("OceanShipmentHouse.aspx?MBL=" + Request["MBL"]); } ControlBinder.pageTitleMsg(true, "OI-H:" + labImpLotNo.Text, "<p class=\"success\">Status : Record Saved with <span>" + labImpLotNo.Text + " </span> </p>", div_bottom); //ControlBinder.pageTitleMsg(false, "OI-H:" + labImpLotNo.Text, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); }
public void SetDes() { ControlBinder.CmbBinder(StoreDes, "Description", true); }
public void StoreLocation_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreLocation, "LocationList", SYS[0].ToString()); }
public void StoreServiceMode_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreServiceMode, "ServerMode", SYS[0].ToString()); }
public void StoreSalesman_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreSalesman, "SalesList", SYS[0].ToString()); }
private void ComboBoxBinding() { ControlBinder.CmbBinder(StoreCN, "ContainerSize"); }
public void binder() { ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", Request["sys"] == null ? "A" : Request["sys"]); }
/// <summary> /// 保存 /// </summary> protected void btnSave_Click(object sender, DirectEventArgs e) { refresh = false; try { if (string.IsNullOrEmpty(cmbVessel.Text)) { cmbVessel.Focus(); return; } if (string.IsNullOrEmpty(txtVoyage.Text.Trim())) { txtVoyage.Focus(); return; } if (string.IsNullOrEmpty(ControlBinder.getDate(txtETD.RawText.StartsWith("0001") ? DBNull.Value : (object)txtETD.RawText).ToString())) { txtETD.Focus(); return; } if (string.IsNullOrEmpty(ControlBinder.getDate(txtETA.RawText.StartsWith("0001") ? DBNull.Value : (object)txtETA.RawText).ToString())) { txtETA.Focus(); return; } DataTable tb = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Voyage_SP", new List <IFields>() { dal.CreateIFields(). Append("Option", "Update"). Append("voy_ROWID", txtVoyageID.Text). Append("voy_Parent", cmbVessel.Value). Append("voy_Voyage", txtVoyage.Text.ToUpper()). Append("voy_POL", cmbPOL.Value). Append("voy_POD", cmbPOD.Value). Append("voy_ETD", ControlBinder.getDate(txtETD.RawText.StartsWith("0001") ? DBNull.Value : (object)txtETD.RawText)). Append("voy_ETA", ControlBinder.getDate(txtETA.RawText.StartsWith("0001") ? DBNull.Value : (object)txtETA.RawText)). Append("voy_Onboard", ControlBinder.getDate(txtOnboard.RawText.StartsWith("0001") ? DBNull.Value : (object)txtOnboard.RawText)). Append("voy_CFS", ControlBinder.getDate(txtCFS.RawText.StartsWith("0001") ? DBNull.Value : (object)txtCFS.RawText)). Append("voy_CY", ControlBinder.getDate(txtCY.RawText.StartsWith("0001") ? DBNull.Value : (object)txtCY.RawText)). Append("voy_Active", chcActive.Checked?1:0). Append("voy_Stat", FSecurityHelper.CurrentUserDataGET()[12]). Append("voy_Sys", "OI"). Append("voy_Vessel", cmbVessel.SelectedItem.Text). Append("voy_User", FSecurityHelper.CurrentUserDataGET()[0]) }).GetTable(); //UpdateList if (tb == null && tb.Rows.Count == 0) { //X.Msg.Alert("prompt", " Save Failed ! ! !").Show(); ControlBinder.pageTitleMsg(this, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); return; } txtVoyageID.Text = tb.Rows[0][0].ToString(); var list = JSON.Deserialize <List <VoyageRoute> >(e.ExtraParams["gridData"]); if (list.Count == 0) { if (!string.IsNullOrEmpty(Request["control"])) { X.AddScript("this.parent.getshowVessel('" + cmbVessel.Text + "','" + txtVoyage.Text + "','" + cmbPOL.Text + "','" + cmbPOD.Text + "','" + txtETD.RawText + "','" + txtETA.RawText + "');"); } else if (!string.IsNullOrEmpty(Request["controlID"])) { X.AddScript("this.parent.getshowVessel('" + cmbVessel.Text + "','" + txtVoyageID.Text + "','" + Request["controlID"] + "');"); } ControlBinder.pageTitleMsg(this, "<p class=\"success\">Status : Save successfully . </p>", div_bottom); DataBinder(); return; } List <IFields> fields = new List <IFields>(); for (int i = 0; i < list.Count; ++i) { fields.Add(dal.CreateIFields(). Append("Option", "UpdateList"). Append("vr_Tovoyage", tb.Rows[0][0]). Append("vr_OrderID", i). Append("vr_POL", list[i].POL). Append("vr_POD", list[i].POD). Append("vr_ETD", ControlBinder.getDate(list[i].ETD)). Append("vr_ETA", ControlBinder.getDate(list[i].ETA)). Append("voy_User", FSecurityHelper.CurrentUserDataGET()[0])); } bool a = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Voyage_SP", new List <IFields>() { dal.CreateIFields(). Append("Option", "DeleteAll"). Append("vr_Tovoyage", txtVoyageID.Text) }).Update(); bool c = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Voyage_SP", fields).Update(); if (!c) { ControlBinder.pageTitleMsg(this, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); } else { if (!string.IsNullOrEmpty(Request["control"])) { X.AddScript("this.parent.getshowVessel('" + cmbVessel.Text + "','" + txtVoyage.Text + "','" + cmbPOL.Text + "','" + cmbPOD.Text + "','" + txtETD.RawText + "','" + txtETA.RawText + "');"); } else if (!string.IsNullOrEmpty(Request["controlID"])) { X.AddScript("this.parent.getshowVessel('" + cmbVessel.Text + "','" + txtVoyageID.Text + "','" + Request["controlID"] + "');"); } ControlBinder.pageTitleMsg(this, "<p class=\"success\">Status : Save successfully . </p>", div_bottom); } DataBinder(); } catch { ControlBinder.pageTitleMsg(this, "<p class=\"error\">Status : Save failed, please check the data . </p>", div_bottom); } }
public void ComboboxBinder() { ControlBinder.CmbBinder(StoreLocation, "LocationList", sys.Substring(0, 1)); ControlBinder.CmbBinder(StoreSalesman, "SalesList", sys.Substring(0, 1)); }
public void StoreVessel_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreVessel, "VesselList"); }
public void StoreLocation_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreLocation, "LocationList", sys.Substring(0, 1)); }
/// <summary> /// Button 事件 修改保存 /// </summary> #region btnSave_Click() 修改保存 Author:Micro (2011-09-05) protected void btnSave_Click(object sender, DirectEventArgs e) { object job = ControlBinder.getDate(string.IsNullOrEmpty(txtJob.RawText.Trim()) ? DBNull.Value : (object)txtJob.RawText.Trim()); object ETD = ControlBinder.getDate(string.IsNullOrEmpty(txtDepartDate.RawText.Trim()) ? DBNull.Value : (object)txtDepartDate.RawText.Trim()); object ETA = ControlBinder.getDate(string.IsNullOrEmpty(txtArrivalDate.RawText.Trim()) ? DBNull.Value : (object)txtArrivalDate.RawText.Trim()); if (cmbVesselCode.SelectedItem.Value == cmbVesselCode.SelectedItem.Text) { cmbVesselCode.SelectedItem.Value = "0"; } if (cmbVesselText.SelectedItem.Value == cmbVesselText.SelectedItem.Text) { cmbVesselText.SelectedItem.Value = "0"; } DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Other_Brokerage_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "Update") .Append("tri_Seed", hidSeed.Text == ""?null:hidSeed.Text) .Append("tri_MBL", txtMAWB.Text.Trim().ToUpper()) .Append("tri_HBL", txtHAWB.Text.Trim().ToUpper()) .Append("tri_VesselID", string.IsNullOrEmpty(cmbVesselCode.SelectedItem.Value)?"0":cmbVesselCode.SelectedItem.Value.Trim().ToUpper()) .Append("tri_Vessel", string.IsNullOrEmpty(cmbVesselCode.SelectedItem.Text)?"":cmbVesselCode.SelectedItem.Text.Trim().ToUpper()) .Append("tri_VoyageID", string.IsNullOrEmpty(cmbVesselText.SelectedItem.Value)?"0":cmbVesselText.SelectedItem.Value.Trim().ToUpper()) .Append("tri_Voyage", string.IsNullOrEmpty(cmbVesselText.SelectedItem.Text)?"":cmbVesselText.SelectedItem.Text.Trim().ToUpper()) .Append("tri_EReceipt", job) .Append("tri_ETD", ETD) .Append("tri_ETA", ETA) .Append("tri_LocReceived", string.IsNullOrEmpty(CmbDeparture.Value)?DBNull.Value:(object)CmbDeparture.Value.Trim().ToUpper()) .Append("tri_LocFinal", string.IsNullOrEmpty(CmbDest.Value)?DBNull.Value:(object)CmbDest.Value.Trim().ToUpper()) .Append("tri_LocReceivedL", txtDepL.Text.Trim().ToUpper()) .Append("tri_LocFinalL", txtDesL.Text.Trim().ToUpper()) .Append("tri_Sales", string.IsNullOrEmpty(CmbSalesman.Value)?DBNull.Value:(object)CmbSalesman.Value.Trim().ToUpper()) .Append("tri_Container", string.IsNullOrEmpty(txtContainer.Text.Trim())?DBNull.Value:(object)txtContainer.Text.Trim()) .Append("tri_Remark", string.IsNullOrEmpty(txtMAWBRemark.Text.Trim())? "":txtMAWBRemark.Text.Trim().ToUpper()) .Append("tri_Shipper", CmbShipperCode.Value.Trim().ToUpper()) .Append("tri_ShipperLine", CmbShipperCode_name.Text.Trim().ToUpper()) .Append("tri_Consignee", CmbConsigneeCode.Value.Trim().ToUpper()) .Append("tri_ConsigneeLine", CmbConsigneeCode_name.Text.Trim().ToUpper()) .Append("tri_PartyA", CmbNotify1Code.Value.Trim().ToUpper()) .Append("tri_PartyALine", CmbNotify1Code_name.Text.Trim().ToUpper()) .Append("tri_PartyB", CmbNotify2Code.Value.Trim().ToUpper()) .Append("tri_PartyBLine", CmbNotify2Code_name.Text.Trim().ToUpper()) .Append("tri_Carrier", CmbCarrierCode.Value.Trim().ToUpper()) .Append("tri_CarrierLine", CmbCarrierCode_name.Text.Trim().ToUpper()) .Append("tri_CoLoader", CmbCoLoader.Value.Trim().ToUpper()) .Append("tri_CoLoaderLine", CmbCoLoader_name.Text.Trim().ToUpper()) .Append("tri_GWT", string.IsNullOrEmpty(txtGWT.Text.Trim())?DBNull.Value:(object)txtGWT.Text) .Append("tri_CBM", string.IsNullOrEmpty(txtCBM.Text.Trim())?DBNull.Value:(object)txtCBM.Text) .Append("tri_CWT", string.IsNullOrEmpty(txtCWT.Text.Trim())?DBNull.Value:(object)txtCWT.Text) .Append("tri_Piece", string.IsNullOrEmpty(txtPiece.Text.Trim())?DBNull.Value:(object)txtPiece.Text) .Append("tri_Unit", CmbUnit.Value) .Append("tri_LastUser", FSecurityHelper.CurrentUserDataGET()[0].ToString()) .Append("tri_STAT", FSecurityHelper.CurrentUserDataGET()[12].ToString()) .Append("tri_SYS", "BK") .Append("tri_User", FSecurityHelper.CurrentUserDataGET()[0].ToString()) .Append("code", FSecurityHelper.CurrentUserDataGET()[4].ToString() + "BK") }).GetTable(); if (dt != null && dt.Rows.Count > 0 && !string.IsNullOrEmpty(dt.Rows[0][0].ToString())) { hidSeed.Text = dt.Rows[0][0].ToString(); } #region Invoice //string rowID = "0,"; //var InvoiceList = JSON.Deserialize<List<Invocie>>(e.ExtraParams["p_safety_4"]); //rowID = "0,"; //for (int i = 0; i < InvoiceList.Count; ++i) //{ // rowID += InvoiceList[i].RowID + ","; //} //rowID = rowID.Substring(0, rowID.Length - 1); //bool inv = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Other_Brokerage_SP", new List<IFields>() { dal.CreateIFields().Append("Option", "DeleteActive") // .Append("tri_Seed",hidSeed.Text) // .Append("str",rowID)}).Update(); #endregion //X.AddScript("saveCost('" + hidSeed.Text + "');"); ucCost.costseed = hidSeed.Text; ucCost.btnCostEvent(sender, e); if (dt != null) { //update cost(Qty,unit,total) //ControlBinder.UpdateCostData(hidSeed.Text, "BK", ""); ControlBinder.pageTitleMsg(true, "Brokerage Shipment:" + labLotNo.Text, "<p class=\"success\">Status : Record Saved with Lot No. <span>" + labLotNo.Text + "</span> </p>", div_bottom); if (dt != null && dt.Rows.Count > 0 && !string.IsNullOrEmpty(dt.Rows[0][0].ToString())) { X.Redirect("List.aspx?seed=" + dt.Rows[0][0]); } else { DataBinder(); } } else { ControlBinder.pageTitleMsg(false, "Brokerage Shipment:" + labLotNo.Text, "<p class=\"error\">Status : Saved failed ! ! ! </p>", div_bottom); } txtMAWB.Focus(true); }
public void StoreSalesman_OnRefreshData(object sender, StoreRefreshDataEventArgs e) { ControlBinder.CmbBinder(StoreSalesman, "SalesList", sys.Substring(0, 1)); }
/// <summary> /// 初始数据 /// </summary> public void Binder() { DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_WarehouseEntry_SP", new List <IFields>() { dal.CreateIFields() .Append("Option", "select") .Append("we_seed", seed.Value) .Append("co_code", FSecurityHelper.CurrentUserDataGET()[12]) .Append("we_User", FSecurityHelper.CurrentUserDataGET()[0]) .Append("we_ROWID", rowid.Value) }).GetList(); DataTable dt = ds.Tables[0]; if (dt != null && ds.Tables.Count == 2 && ds.Tables[1].Rows[0][0].ToString() == "Y") { labImpLotNo.Text = dt.Rows[0]["lotno"].ToString(); labMBL.Text = dt.Rows[0]["mbl"].ToString(); txtCompany.setValue(dt.Rows[0]["we_Company"].ToString()); txtCompanyName.Text = dt.Rows[0]["we_HandleName"].ToString(); txtCustomer.setValue(dt.Rows[0]["we_Customer"].ToString()); txtCustomerLine.Text = dt.Rows[0]["we_CustomerLine"].ToString(); txtNoticeDate.Text = dt.Rows[0]["we_NoticeDate"].ToString(); txtOperation.Text = dt.Rows[0]["we_OperationUser"].ToString(); txtOpExt.Text = dt.Rows[0]["we_OperationExt"].ToString(); txtDcument.Text = dt.Rows[0]["we_DocumnetUser"].ToString(); txtDocExt.Text = dt.Rows[0]["we_DocumnetExt"].ToString(); txtPhone.Text = dt.Rows[0]["we_ContactTel"].ToString(); txtFax.Text = dt.Rows[0]["we_ContactFax"].ToString(); txtPOD.setValue(dt.Rows[0]["we_POD"].ToString()); cmbVesselCode.Text = dt.Rows[0]["we_Vessel"].ToString(); StoreVoyage.RemoveAll(); DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "VoyageList"). Append("sys", FSecurityHelper.CurrentUserDataGET()[12]). Append("STAT", cmbVesselCode.Text) }).GetTable(); StoreVoyage.DataSource = dt1; StoreVoyage.DataBind(); cmbVesselText.Template.Html = TempVoyage.Html; if (dt1 != null && dt1.Rows.Count > 0) { cmbVesselText.Value = dt.Rows[0]["we_Voyage"].ToString(); } //cmbVesselText.Text = dt.Rows[0]["we_Voyage"].ToString(); txtDeclareNo.Text = dt.Rows[0]["we_DeclareNo"].ToString(); txtNoticeNo.Text = dt.Rows[0]["we_NoticeNo"].ToString(); txtETD.Text = dt.Rows[0]["we_ETD"].ToString(); txtWsheTime.Text = dt.Rows[0]["we_warehouseclosingtime"].ToString(); txtHandleTime.Text = dt.Rows[0]["we_docmentclosingtime"].ToString(); txtWhseClosing.Text = dt.Rows[0]["we_WarehouseClosing"].ToString(); txtwarehouse.setValue(dt.Rows[0]["we_WarehouseCode"].ToString()); txtWsheName.Text = dt.Rows[0]["we_WarehouseName"].ToString(); txtwhseAdd.Text = dt.Rows[0]["we_WarehouseAddress"].ToString(); txtWsheContact.Text = dt.Rows[0]["we_WarehousePerson"].ToString(); txtWshePhone.Text = dt.Rows[0]["we_WarehouseTel"].ToString(); txtWsheExt.Text = dt.Rows[0]["we_WarehouseExt"].ToString(); txtWsheFxt.Text = dt.Rows[0]["we_WarehouseFax"].ToString(); txtHandleClosing.Text = dt.Rows[0]["we_DocmentClosing"].ToString(); txtHandle.setValue(dt.Rows[0]["we_HandleCode"].ToString()); txtHandleName.Text = dt.Rows[0]["we_HandleName"].ToString(); txtHandleAdd.Text = dt.Rows[0]["we_HandleAddress"].ToString(); txtHandlContact.Text = dt.Rows[0]["we_HandlePerson"].ToString(); txtHandlPhone.Text = dt.Rows[0]["we_HandleTel"].ToString(); txtHandlExt.Text = dt.Rows[0]["we_HandleExt"].ToString(); txtHandlFxt.Text = dt.Rows[0]["we_HandleFax"].ToString(); ControlBinder.pageTitleMsg(false, this, "<p class=\"success\">Status : Edit warehouse information.</p>", div_bottom); } else if (ds != null && ds.Tables.Count == 5 && ds.Tables[1].Rows.Count > 0 && ds.Tables[4].Rows[0][0].ToString() == "N") { labImpLotNo.Text = ds.Tables[1].Rows[0]["lotno"].ToString(); labMBL.Text = ds.Tables[1].Rows[0]["mbl"].ToString(); txtCompany.setValue(ds.Tables[3].Rows[0]["we_Company"].ToString()); txtCompanyName.Text = ds.Tables[3].Rows[0]["we_CompanyName"].ToString(); txtCustomer.Text = ""; txtCustomerLine.Text = ""; txtNoticeDate.Text = ds.Tables[1].Rows[0]["we_NoticeDate"].ToString(); txtOperation.Text = ds.Tables[2].Rows[0]["we_OperationUser"].ToString(); txtOpExt.Text = ds.Tables[2].Rows[0]["we_OperationExt"].ToString(); txtDcument.Text = ""; txtDocExt.Text = ""; txtPhone.Text = ""; txtFax.Text = ""; txtPOD.setValue(ds.Tables[1].Rows[0]["we_POD"].ToString()); cmbVesselCode.Text = ds.Tables[1].Rows[0]["we_Vessel"].ToString(); StoreVoyage.RemoveAll(); DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "VoyageList"). Append("sys", FSecurityHelper.CurrentUserDataGET()[12]). Append("STAT", cmbVesselCode.Text) }).GetTable(); StoreVoyage.DataSource = dt1; StoreVoyage.DataBind(); cmbVesselText.Template.Html = TempVoyage.Html; if (dt1 != null && dt1.Rows.Count > 0) { cmbVesselText.Value = ds.Tables[1].Rows[0]["we_Voyage"].ToString(); } //cmbVesselText.Text = dt.Rows[0]["we_Voyage"].ToString(); txtDeclareNo.Text = ""; txtNoticeNo.Text = ds.Tables[1].Rows[0]["we_NoticeNo"].ToString(); txtETD.Text = ds.Tables[1].Rows[0]["we_ETD"].ToString(); ////txtWsheTime.Text = ""; //txtHandleTime.Text = ""; txtWhseClosing.Text = ""; txtwarehouse.setValue(ds.Tables[0].Rows[0]["we_WarehouseCode"].ToString()); txtWsheName.Text = ds.Tables[0].Rows[0]["we_WarehouseName"].ToString(); txtwhseAdd.Text = ds.Tables[0].Rows[0]["we_WarehouseAddress"].ToString(); txtWsheContact.Text = ds.Tables[0].Rows[0]["we_WarehousePerson"].ToString(); txtWshePhone.Text = ds.Tables[0].Rows[0]["we_WarehouseTel"].ToString(); txtWsheExt.Text = ds.Tables[0].Rows[0]["we_WarehouseExt"].ToString(); txtWsheFxt.Text = ds.Tables[0].Rows[0]["we_WarehouseFax"].ToString(); txtHandleClosing.Text = ""; txtHandle.setValue(ds.Tables[3].Rows[0]["we_Company"].ToString()); txtHandleName.Text = ds.Tables[3].Rows[0]["we_CompanyName"].ToString(); txtHandleAdd.Text = ds.Tables[3].Rows[0]["we_HandleAddress"].ToString(); txtHandlContact.Text = ds.Tables[3].Rows[0]["we_HandlePerson"].ToString(); txtHandlPhone.Text = ds.Tables[3].Rows[0]["we_HandleTel"].ToString(); txtHandlExt.Text = ""; txtHandlFxt.Text = ds.Tables[3].Rows[0]["we_HandleFax"].ToString(); ControlBinder.pageTitleMsg(false, "New WareHouse", "<p>Status : New blank wareHouse information. </p>", div_bottom); } else { Response.Write("Error: invalid parameter, please check the data."); Response.End(); Response.Flush(); Response.Clear(); } }
/// <summary> /// 初始数据 /// </summary> #region 初始数据 DataBinder() Author:Micro (2011-09-05) void DataBinder() { DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Triangle_Air_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "GetList").Append("tri_Seed", hidSeed.Text) }).GetList(); if (ds != null && ds.Tables[0].Rows.Count > 0) { labLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString(); hidLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString(); txtMAWB.Text = ds.Tables[0].Rows[0]["tri_MBL"].ToString(); txtHAWB.Text = ds.Tables[0].Rows[0]["tri_HBL"].ToString(); txtFlightNo.Text = ds.Tables[0].Rows[0]["tri_Flight"].ToString(); CmbDeparture.setValue(ds.Tables[0].Rows[0]["tri_LocReceived"].ToString()); CmbDest.setValue(ds.Tables[0].Rows[0]["tri_LocFinal"].ToString()); txtDepL.Text = ds.Tables[0].Rows[0]["tri_LocReceivedL"].ToString(); txtDesL.Text = ds.Tables[0].Rows[0]["tri_LocFinalL"].ToString(); txtDepartDate.Text = ds.Tables[0].Rows[0]["tri_ETD"].ToString(); txtArrivalDate.Text = ds.Tables[0].Rows[0]["tri_ETA"].ToString(); txtJob.Text = ds.Tables[0].Rows[0]["tri_EReceipt"].ToString(); CmbSalesman.setValue(ds.Tables[0].Rows[0]["tri_Sales"].ToString()); txtMAWBRemark.Text = ds.Tables[0].Rows[0]["tri_Remark"].ToString(); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_GWT"].ToString())) { txtGWT.Text = ds.Tables[0].Rows[0]["tri_GWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_VWT"].ToString())) { txtVWT.Text = ds.Tables[0].Rows[0]["tri_VWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CWT"].ToString())) { txtCWT.Text = ds.Tables[0].Rows[0]["tri_CWT"].ToString(); } if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Piece"].ToString())) { txtPiece.Text = ds.Tables[0].Rows[0]["tri_Piece"].ToString(); } CmbUnit.setValue(ds.Tables[0].Rows[0]["tri_Unit"].ToString()); CmbShipperCode.setValue(ds.Tables[0].Rows[0]["tri_Shipper"].ToString()); CmbShipperCode1.Text = ds.Tables[0].Rows[0]["tri_Shipper"].ToString(); CmbShipperCode_name.Text = ds.Tables[0].Rows[0]["tri_ShipperLine"].ToString(); CmbConsigneeCode.setValue(ds.Tables[0].Rows[0]["tri_Consignee"].ToString()); CmbConsigneeCode1.Text = ds.Tables[0].Rows[0]["tri_Consignee"].ToString(); CmbConsigneeCode_name.Text = ds.Tables[0].Rows[0]["tri_ConsigneeLine"].ToString(); CmbNotify1Code.setValue(ds.Tables[0].Rows[0]["tri_PartyA"].ToString()); CmbNotify1Code1.Text = ds.Tables[0].Rows[0]["tri_PartyA"].ToString(); CmbNotify1Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyALine"].ToString(); CmbNotify2Code.setValue(ds.Tables[0].Rows[0]["tri_PartyB"].ToString()); CmbNotify2Code1.Text = ds.Tables[0].Rows[0]["tri_PartyB"].ToString(); CmbNotify2Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyBLine"].ToString(); CmbCarrierCode.setValue(ds.Tables[0].Rows[0]["tri_Carrier"].ToString()); CmbCarrierCode1.Text = ds.Tables[0].Rows[0]["tri_Carrier"].ToString(); CmbCarrierCode_name.Text = ds.Tables[0].Rows[0]["tri_CarrierLine"].ToString(); CmbCoLoader.setValue(ds.Tables[0].Rows[0]["tri_CoLoader"].ToString()); CmbCoLoader1.Text = ds.Tables[0].Rows[0]["tri_CoLoader"].ToString(); CmbCoLoader_name.Text = ds.Tables[0].Rows[0]["tri_CoLoaderLine"].ToString(); if (ControlBinder.IsDisplayLotNo(txtJob.Text.Trim(), hidLotNo.Text)) { btnUpdateLotNo.Show(); } else { btnUpdateLotNo.Hide(); } if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y") { img_void.Style.Value = "display:none"; } else { img_void.Style.Value = "display:inline"; btnSave.Disabled = true; btnCancel.Disabled = true; btnNext.Disabled = true; btnVoid.Text = "Active"; hidVoid.Text = "1"; btnUpdateLotNo.Hide(); } gridInvoice.GetStore().DataSource = ds.Tables[1]; gridInvoice.GetStore().DataBind(); ControlBinder.pageTitleMsg(false, "Air Shipment:" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString(), "<p>Status : Edit Air Shipment of <span>" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString() + "</span></p>", div_bottom); } else { txtJob.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtJob.Text = DateTime.Now.ToString("yyyy/MM/dd"); txtDepartDate.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtDepartDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); txtArrivalDate.RawText = DateTime.Now.ToString("dd/MM/yyyy"); txtArrivalDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); //CmbUnit.setValue("CTN"); ControlBinder.pageTitleMsg(false, "Air Shipment:New", "<p>Status : New Blank Air Shipment </p>", div_bottom); } }