コード例 #1
0
        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();
            }
        }