void updatespecificationvalues(SH_PRINTED_MATERIAL_PARCEL myparcel)
 {
     try
     {
         string query = "UPDATE  SH_SPECIFICATION_OF_PRINTED_MATERIAL ";
         query += " SET SH_ITEM_TOTAL_NO_SHEETS = SH_ITEM_TOTAL_NO_SHEETS - @SH_ITEM_TOTAL_NO_SHEETS , SH_ITEM_TOTAL_NET_WEIGHT = SH_ITEM_TOTAL_NET_WEIGHT - @SH_ITEM_TOTAL_NET_WEIGHT, SH_ITEM_TOTAL_GROSS_WEIGHT = SH_ITEM_TOTAL_GROSS_WEIGHT - @SH_ITEM_TOTAL_GROSS_WEIGHT, SH_ITEM_TOTAL_NO_PARCELS =  SH_ITEM_TOTAL_NO_PARCELS  - @SH_ITEM_TOTAL_NO_PARCELS  WHERE SH_ID  = @SH_ID";
         DatabaseConnection myconnection = new DatabaseConnection();
         myconnection.openConnection();
         SqlCommand cmd = new SqlCommand(query, DatabaseConnection.mConnection);
         cmd.Parameters.AddWithValue("@SH_ITEM_TOTAL_NO_SHEETS", myparcel.SH_PARCEL_NO_SHEETS);
         cmd.Parameters.AddWithValue("@SH_ITEM_TOTAL_NET_WEIGHT", myparcel.SH_PARCEL_NET_WEIGHT);
         cmd.Parameters.AddWithValue("@SH_ITEM_TOTAL_GROSS_WEIGHT", myparcel.SH_ITEM_TOTAL_GROSS_WEIGHT);
         cmd.Parameters.AddWithValue("@SH_ITEM_TOTAL_NO_PARCELS", 1);
         cmd.Parameters.AddWithValue("@SH_ID", myparcel.SH_SPECIFICATION_OF_PRINTED_MATERIAL_ID);
         cmd.ExecuteNonQuery();
         myconnection.closeConnection();
     }
     catch (Exception ex)
     {
         MessageBox.Show("ERROR WHILE UPDATING SPECIFICATIONS VALUES " + ex.ToString());
     }
 }
        void loadMuranMaterial(SH_PRINTED_MATERIAL_PARCEL myparcel)
        {
            try
            {
                string             query        = "SELECT * FROM SH_SPECIFICATION_OF_MURAN_MATERIAL WHERE SH_ID  = @SH_ID ";
                DatabaseConnection myconnection = new DatabaseConnection();
                myconnection.openConnection();
                SqlCommand cmd = new SqlCommand(query, DatabaseConnection.mConnection);
                cmd.Parameters.AddWithValue("@SH_ID", myparcel.SH_SPECIFICATION_OF_PRINTED_MATERIAL_ID);
                SqlDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    //error      specifMuranMaterialLst.Add(new SH_SPECIFICATION_OF_MURAN_MATERIAL { SH_ID = long.Parse(reader["SH_ID"].ToString()), SH_ITEM_COATING = reader["SH_ITEM_COATING"].ToString(), SH_ITEM_CODE = reader["SH_ITEM_CODE"].ToString(), SH_ITEM_FINISH = reader["SH_ITEM_FINISH"].ToString(), SH_ITEM_LENGTH = long.Parse(reader["SH_ITEM_LENGTH"].ToString()), SH_ITEM_SHEET_WEIGHT = long.Parse(reader["SH_ITEM_SHEET_WEIGHT"].ToString()), SH_ITEM_TEMPER = reader["SH_ITEM_TEMPER"].ToString(), SH_ITEM_THICKNESS = double.Parse(reader["SH_ITEM_THICKNESS"].ToString()), , SH_ITEM_TYPE = reader["SH_ITEM_TYPE"].ToString(), SH_ITEM_WIDTH = double.Parse(reader["SH_ITEM_WIDTH"].ToString()) });
                }

                myconnection.closeConnection();
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERRO WHILE GETTING printed material DATA FROM DB " + ex.ToString());
            }
        }
 public showprintedparcelclientsandproducts(SH_PRINTED_MATERIAL_PARCEL anyparcel)
 {
     InitializeComponent();
     parcel = anyparcel;
 }