protected void btnSave_Click(object sender, EventArgs e) { DataFactory dal = new DataFactory(); bool flag = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Report_OEOutShipment", new List <IFields>() { dal.CreateIFields() .Append("option", "update").Append("inv_id", hidID.Text) .Append("bli_BNRemark", ControlBinder.GetMakeStr(txtRemark.Text.TrimEnd().ToUpper(), 80)) }).Update(); if (flag == true) { //X.AddScript("if(window.parent!=null){window.parent.location.reload();}"); X.AddScript("if(window.parent!=null){window.parent.Refresh();}"); } }
protected void btnSave_Click(object sender, DirectEventArgs e) { DataFactory dal = new DataFactory(); List <IFields> attachlist = new List <IFields>(); for (int i = 0; i < repList.Items.Count; i++) { attachlist.Add(dal.CreateIFields().Append("Option", "UpdateAttachList"). Append("oc_OrderMarks", ControlBinder.GetMakeStr(((TextBox)repList.Items[i].FindControl("txtM")).Text.TrimEnd().ToUpper(), 19)). Append("oc_OrderNoOfPackage", ControlBinder.GetMakeStr(((TextBox)repList.Items[i].FindControl("txtP")).Text.TrimEnd().ToUpper(), 10)). Append("oc_OrderDescription", ControlBinder.GetMakeStr(((TextBox)repList.Items[i].FindControl("txtD")).Text.TrimEnd().ToUpper(), 46)). Append("oc_User", FSecurityHelper.CurrentUserDataGET()[0]). Append("ROWID", ((HiddenField)repList.Items[i].FindControl("hidID")).Value) ); } dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_BillOfLading_SP", attachlist).Update(); X.AddScript("window.parent.CompanyX.MakeDetail();window.parent.winShow.close();"); }
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); } }
public void SetStrLine() { txtLine.Text = ControlBinder.GetMakeStr(txtLine.Text.TrimEnd().ToUpper(), 28); }