public static string PMSaveWLocation(object WLocationInfo, string LocationID) { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); mLocation loc = new mLocation(); tSKUTransaction skutrans = new tSKUTransaction(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)WLocationInfo; loc.ShelfID = long.Parse(dictionary["ShelfID"].ToString()); loc.Code = dictionary["LocationCode"].ToString(); loc.AliasCode = dictionary["AliasCode"].ToString(); loc.SortCode = long.Parse(dictionary["SortCode"].ToString()); loc.LocationType = dictionary["LocationType"].ToString(); loc.CapacityIn = long.Parse(dictionary["CapacityIn"].ToString()); loc.Capacity = decimal.Parse(dictionary["Capacity"].ToString()); loc.VelocityType = dictionary["VelocityType"].ToString(); loc.CompanyID = long.Parse(dictionary["CompanyID"].ToString()); loc.CustomerID = long.Parse(dictionary["CustomerID"].ToString()); loc.Active = dictionary["Active"].ToString().Trim(); loc.WarehouseID = long.Parse(dictionary["WarehouseID"].ToString()); skutrans.ClosingBalance = 0; skutrans.InQty = 0; skutrans.OutQty = 0; skutrans.CreatedBy = profile.Personal.UserID; skutrans.CreationDate = DateTime.Now; skutrans.CompanyID = long.Parse(dictionary["CompanyID"].ToString()); skutrans.CustomerID = long.Parse(dictionary["CustomerID"].ToString()); if (LocationID != "0") { loc.ID = long.Parse(LocationID); loc.CreatedBy = profile.Personal.UserID; loc.CreationDate = DateTime.Now; long LocID = Warehouseclient.SaveWarehouseLocation(loc, profile.DBConnection._constr); } else { loc.AvailableBalance = 0; loc.CreatedBy = profile.Personal.UserID; loc.CreationDate = DateTime.Now; long LocID = Warehouseclient.SaveWarehouseLocation(loc, profile.DBConnection._constr); skutrans.LocationID = LocID; Warehouseclient.AddRecordInSkuTransaction(skutrans, profile.DBConnection._constr); } result = "Location saved successfully"; } catch { result = "Some error occurred"; } finally { Warehouseclient.Close(); } return(result); }
protected void FillWarehouse() { ddlWarehouse.Items.Clear(); iWarehouseClient Warehouse = new iWarehouseClient(); CustomProfile profile = CustomProfile.GetProfile(); long UserID = profile.Personal.UserID; ddlWarehouse.DataSource = Warehouse.GetWarehousebyUserID(UserID, profile.DBConnection._constr); ddlWarehouse.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlWarehouse.Items.Insert(0, lst); Warehouse.Close(); }
protected void GetBuildingByID() { CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); try { mWarehouseBuilding warebuilding = new mWarehouseBuilding(); warebuilding = Warehouseclient.GetWareBuildingByID(long.Parse(hdnbuilding.Value), profile.DBConnection._constr); if (warebuilding.Name != null) { txtbuildname.Text = warebuilding.Name.ToString(); } if (warebuilding.SortCode != null) { txtsortcode.Text = warebuilding.SortCode.ToString(); } if (warebuilding.Capacity != null) { txtcapacity.Text = warebuilding.Capacity.ToString(); } if (warebuilding.Description != null) { txtdescription.Text = warebuilding.Description.ToString(); } if (warebuilding.CustomerID != null) { hdncustomerID.Value = warebuilding.CustomerID.ToString(); } hdnCompanyID.Value = warebuilding.CompanyID.ToString(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "AddEditSearchContact", "GetContactDetailByContactID"); } finally { Warehouseclient.Close(); } }
protected void GetFloarByID() { CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); try { mFloar Floar = new mFloar(); Floar = Warehouseclient.GetWarehouseFloarbyID(long.Parse(hdnfloarID.Value), profile.DBConnection._constr); if (Floar.Name != null) { txtfloarname.Text = Floar.Name.ToString(); } if (Floar.SortCode != null) { txtsortcode.Text = Floar.SortCode.ToString(); } if (Floar.Capacity != null) { txtcapacity.Text = Floar.Capacity.ToString(); } if (Floar.Description != null) { txtdescription.Text = Floar.Description.ToString(); } if (Floar.CustomerID != null) { hdncustomerID.Value = Floar.CustomerID.ToString(); } hdnCompanyID.Value = Floar.CompanyID.ToString(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "WarehouseFloar", "GetFloarByID"); } finally { Warehouseclient.Close(); } }
public static string WMSaveRequestHead(object objCon, string State) { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); mPathway path = new mPathway(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objCon; path.Name = dictionary["Name"].ToString(); path.SortCode = long.Parse(dictionary["SortCode"].ToString()); path.Description = dictionary["description"].ToString(); path.CompanyID = long.Parse(dictionary["CompanyId"].ToString()); path.CustomerID = long.Parse(dictionary["CustomerID"].ToString()); path.FloarID = long.Parse(dictionary["hdnfloarID"].ToString()); if (State == "Edit") { path.ID = Convert.ToInt64(HttpContext.Current.Session["PassageID"].ToString()); path.CreatedBy = profile.Personal.UserID; path.CreationDate = DateTime.Now; long FloarID = Warehouseclient.SaveWarehousePassage(path, profile.DBConnection._constr); } else { path.CreatedBy = profile.Personal.UserID; path.CreationDate = DateTime.Now; long FloarID = Warehouseclient.SaveWarehousePassage(path, profile.DBConnection._constr); } result = "Passage saved successfully"; } catch { result = "Some error occurred"; } finally { Warehouseclient.Close(); } return(result); }
public static string WMSaveRequestHead(object objCon, string State) { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); mFloar floar = new mFloar(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objCon; floar.Name = dictionary["Name"].ToString(); floar.SortCode = long.Parse(dictionary["SortCode"].ToString()); floar.Capacity = decimal.Parse(dictionary["Capacity"].ToString()); floar.Description = dictionary["description"].ToString(); floar.CompanyID = long.Parse(dictionary["CompanyId"].ToString()); floar.CustomerID = long.Parse(dictionary["CustomerID"].ToString()); floar.BuildingID = long.Parse(dictionary["BuildingID"].ToString()); if (State == "Edit") { floar.ID = Convert.ToInt64(HttpContext.Current.Session["FloarID"].ToString()); floar.CreatedBy = profile.Personal.UserID; floar.CreationDate = DateTime.Now; long FloarID = Warehouseclient.SaveWarehouseFloar(floar, profile.DBConnection._constr); } else { floar.CreatedBy = profile.Personal.UserID; floar.CreationDate = DateTime.Now; long FloarID = Warehouseclient.SaveWarehouseFloar(floar, profile.DBConnection._constr); } result = "Floar saved successfully"; } catch { result = "Some error occurred"; } finally { Warehouseclient.Close(); } return(result); }
protected void WarehouseGridBind() { iWarehouseClient WarehouseClient = new iWarehouseClient(); try { CustomProfile profile = CustomProfile.GetProfile(); long CompanyID = profile.Personal.CompanyID; List <V_WMS_GetWarehouseDetails> warehouselst = new List <V_WMS_GetWarehouseDetails>(); warehouselst = WarehouseClient.GetWarehouseList(CompanyID, profile.DBConnection._constr).ToList(); warehouselst = warehouselst.Where(w => w.CompanyID == CompanyID).ToList(); grdWarehouseList.DataSource = warehouselst; grdWarehouseList.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Warehouse Master", "MainCustomerGridBind"); } finally { WarehouseClient.Close(); } }
protected void GetPassageID() { CustomProfile profile = CustomProfile.GetProfile(); iWarehouseClient Warehouseclient = new iWarehouseClient(); try { mPathway path = new mPathway(); path = Warehouseclient.GetWarehousePassageByID(long.Parse(hdnpassageID.Value), profile.DBConnection._constr); if (path.Name != null) { txtpassage.Text = path.Name.ToString(); } if (path.SortCode != null) { txtsortcode.Text = path.SortCode.ToString(); } if (path.Description != null) { txtdescription.Text = path.Description.ToString(); } if (path.CustomerID != null) { hdncustomerID.Value = path.CustomerID.ToString(); } hdnCompanyID.Value = path.CompanyID.ToString(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "WarehousePassage", "GetPassageID"); } finally { Warehouseclient.Close(); } }