public void postmaster_department_update(AppLogic.Department WH, int get_whid, int get_bid)
        {
            SqlConnection conWH = new SqlConnection(cs);
            SqlCommand    cmdWH = new SqlCommand("update departments set [dept_cat_id]='" + WH.dept_cat_id + "' 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_department(AppLogic.Department WH)
        {
            SqlConnection conWH = new SqlConnection(cs);
            SqlCommand    cmdWH = new SqlCommand("INSERT INTO departments(dept_name,dept_cat_id,isActive,b_entity_id) values('" + WH.dept_name + "'," + WH.dept_cat_id + ",1," + 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;
            }
        }