public void postmaster_wh_update(AppLogic.Warehouse WH, int get_whid, int get_bid)
        {
            SqlConnection conWH = new SqlConnection(cs);
            SqlCommand    cmdWH = new SqlCommand("update warehouse set [wh_desc]='" + WH.wh_desc + "' , [type_id]=" + WH.type_id + " , [location_id]=" + WH.location_id + " , [cat_id]=" + WH.cat_id + " , [uid]=" + WH.uid + " where isActive=1 AND id=" + get_whid + " AND b_entity_id=" + get_bid, conWH);

            try
            {
                conWH.Open();
                cmdWH.ExecuteNonQuery();
                conWH.Close();
                errTrue = false;
            }
            catch (Exception ex)
            {
                conWH.Close();
                repText = ex.ToString();
                errTrue = true;
            }
        }
        public void postmaster_wh(AppLogic.Warehouse WH)
        {
            SqlConnection conWH = new SqlConnection(cs);
            SqlCommand    cmdWH = new SqlCommand("INSERT INTO warehouse([wh_name],[wh_desc],[type_id],[location_id],[cat_id],[isActive],[uid],[b_entity_id]) values('" + WH.wh_name + "','" + WH.wh_desc + "'," + WH.type_id + "," + WH.location_id + "," + WH.cat_id + ",'" + WH.isActive + "'," + WH.uid + "," + WH.b_entity_id + ")", conWH);

            try
            {
                conWH.Open();
                cmdWH.ExecuteNonQuery();
                conWH.Close();
                errTrue = false;
            }
            catch (Exception ex)
            {
                conWH.Close();
                repText = ex.ToString();
                errTrue = true;
                //throw;
            }
        }