public static string WMSaveRequestHead(object objCon, string State)
        {
            string        result  = "";
            CustomProfile profile = CustomProfile.GetProfile();

            iWarehouseClient   Warehouseclient = new iWarehouseClient();
            mWarehouseBuilding building        = new mWarehouseBuilding();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objCon;

                building.Name        = dictionary["Name"].ToString();
                building.SortCode    = dictionary["SortCode"].ToString();
                building.Capacity    = decimal.Parse(dictionary["Capacity"].ToString());
                building.Description = dictionary["description"].ToString();
                building.CompanyID   = long.Parse(dictionary["CompanyId"].ToString());
                building.CustomerID  = long.Parse(dictionary["CustomerID"].ToString());
                building.WarehouseID = long.Parse(dictionary["WarehouseID"].ToString());

                if (State == "Edit")
                {
                    building.ID = Convert.ToInt64(HttpContext.Current.Session["BuildingID"].ToString());
                    long BuildID = Warehouseclient.SaveWareBuilding(building, profile.DBConnection._constr);
                }
                else
                {
                    building.CreatedBy    = profile.Personal.UserID;
                    building.CreationDate = DateTime.Now;
                    long BuildID = Warehouseclient.SaveWareBuilding(building, profile.DBConnection._constr);
                }
                result = "Building saved successfully";
            }
            catch { result = "Some error occurred"; }
            finally { Warehouseclient.Close(); }

            return(result);
        }