protected void btnSub_Click(object sender, DirectEventArgs e) { string id = e.ExtraParams["RowID"]; if (id == "[]" && Request["subseed"] == null) { X.Msg.Alert("Information", "Please select rows!").Show(); } else { string str = ""; var SubShipment = JSON.Deserialize <List <SubShipment> >(e.ExtraParams["RowID"]); for (int i = 0; i < SubShipment.Count; ++i) { str += "," + SubShipment[i].RowID; } if (str.Length > 1) { str = str.Substring(1, str.Length - 1); } string MAWB = "", RequestID = "", seed = "", type = ""; MAWB = Request["MAWB"]; RequestID = Server.UrlDecode(Request["subIDList"] == null ? "" : Request["subIDList"]); seed = Request["subseed"] == null ? "" : Request["subseed"]; type = Request["transfer"]; if (RequestID.Length > 1) { str = RequestID + "," + str; } DataSet result = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_SubShipment_SP", new List <IFields> { dal.CreateIFields().Append("Option", "CheckSubShipment") .Append("str", str) }).GetList(); if (result != null && result.Tables[0].Rows.Count > 0) { if (result.Tables[0].Rows[0]["Flag"].ToString() == "Y") { X.Msg.Alert("Information", "Cannot select any record with different Sub Shipment Master Record").Show(); } else { if (type == "sub") { //X.Redirect("../AESubShipment/List.aspx?seed=" + seed + "&MAWB=" + MAWB + "&IDList=" + Server.UrlEncode(str)); //X.AddScript("window.dialogArguments.location.href='../AESubShipment/List.aspx?seed=" + seed + "&MAWB=" + MAWB + "&IDList=" + Server.UrlEncode(str) + "';window.close();"); X.AddScript("window.dialogArguments.refreshdata(\"" + seed + "\",\"" + str + "\");window.close();"); } else { CheckboxSelectionModel sm = this.gridList.SelectionModel.Primary as CheckboxSelectionModel; sm.ClearSelections(); X.AddScript("window.open('../AESubShipment/List.aspx?MAWB=" + MAWB + "&seed=" + result.Tables[0].Rows[0]["air_Seed"] + "&IDList=" + Server.UrlEncode(str) + "','_blank');"); } } } } }
protected void btnDirect_Click(object sender, DirectEventArgs e) { string id = e.ExtraParams["RowID"]; if (id == "[]" && Request["transSeed"] == null) { X.Msg.Alert("Information", "Please select rows!").Show(); } else { string str = ""; var Direct = JSON.Deserialize <List <MakeConsol> >(e.ExtraParams["RowID"]); for (int i = 0; i < Direct.Count; ++i) { str += "," + Direct[i].RowID; } if (str.Length > 1) { str = str.Substring(1, str.Length - 1); DataSet result = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_ConsolManagement_SP", new List <IFields> { dal.CreateIFields().Append("Option", "CheckMakeDirect") .Append("str", str) }).GetList(); str = ""; for (int i = 0; i < result.Tables[0].Rows.Count; i++) { str += "," + result.Tables[0].Rows[i][0].ToString(); } str = str.Substring(1, str.Length - 1); } string RequestID = "", seed = "", type = ""; RequestID = Server.UrlDecode(Request["transIDList"] == null ? "" : Request["transIDList"]); seed = Request["transSeed"] == null ? "" : Request["transSeed"]; type = Request["transfer"]; if (type == "d") { str = RequestID + "," + str; //X.Redirect("../AEMakeDirect/List.aspx?seed=" + seed + "&IDList=" + Server.UrlEncode(str)); //X.AddScript("window.dialogArguments.location.href='../AEMakeDirect/List.aspx?seed=" + seed + "&IDList=" + Server.UrlEncode(str) + "';window.close();"); X.AddScript("window.dialogArguments.refreshdata(\"" + seed + "\",\"" + str + "\");window.close();"); } else { CheckboxSelectionModel sm = this.gridList.SelectionModel.Primary as CheckboxSelectionModel; sm.ClearSelections(); X.AddScript("window.open('../AEConsolAndDirect/List.aspx?type=d&IDList=" + Server.UrlEncode(str) + "','_blank');"); } } }
protected void btnAssign_Click(object sender, DirectEventArgs e) { string id = e.ExtraParams["RowID"]; if (id == "[]" && Request["JobIDList"] == null) { X.Msg.Alert("Information", "Please select rows!").Show(); } else { string str = ""; var JobList = JSON.Deserialize <List <Assign> >(e.ExtraParams["RowID"]); for (int i = 0; i < JobList.Count; ++i) { str += "," + JobList[i].o_Seed; } if (str.Length > 1) { str = str.Substring(1, str.Length - 1); } string RequestID = Server.UrlDecode(Request["JobIDList"] == null ? "" : Request["JobIDList"]); string seed = Request["Jobseed"] == null ? "" : Request["Jobseed"]; if (RequestID.Length > 1) { str = RequestID + "," + str; } if (Request["JobType"] == null) { CheckboxSelectionModel sm = this.gridList.SelectionModel.Primary as CheckboxSelectionModel; sm.ClearSelections(); X.AddScript("window.open('../OEAssignJob/List.aspx?IDList=" + Server.UrlEncode(str) + "','_blank');"); } else { X.AddScript("window.dialogArguments.refreshdata(\"" + seed + "\",\"" + str + "\");window.close();"); } } }