Example #1
0
 private void DataControl_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (t_Type == "RawResidue")
     {
         string             NameData    = DataControl.Rows[e.RowIndex].Cells[0].Value.ToString();
         float              Price       = float.Parse(DataControl.Rows[e.RowIndex].Cells[4].Value.ToString().Replace(".", ","));
         float              Summ        = float.Parse(DataControl.Rows[e.RowIndex].Cells[5].Value.ToString().Replace(".", ","));
         float              Mass        = float.Parse(DataControl.Rows[e.RowIndex].Cells[1].Value.ToString().Replace(".", ","));
         float              Count       = float.Parse(DataControl.Rows[e.RowIndex].Cells[2].Value.ToString().Replace(".", ","));
         float              CratesCount = float.Parse(DataControl.Rows[e.RowIndex].Cells[3].Value.ToString().Replace(".", ","));
         string             IDData      = String.Empty;
         string             DateData    = String.Empty;
         string             Provider    = String.Empty;
         string             Recipient   = String.Empty;
         RawMaterialsRemove RMR         = new RawMaterialsRemove();
         RMR.titlebox.Text = NameData;
         RMR.ID            = IDData;
         RMR.Date          = DateData;
         RMR.Provider      = Provider;
         RMR.Recipient     = Recipient;
         RMR.Price         = Price;
         RMR.Summ          = Summ;
         RMR.Mass          = Mass;
         RMR.Count         = Count;
         RMR.CratesCount   = CratesCount;
         RMR.ShowDialog(this);
     }
     else if (t_Type == "ShopResidue")
     {
         string NameData         = DataControl.Rows[e.RowIndex].Cells[0].Value.ToString();
         float  Price            = float.Parse(DataControl.Rows[e.RowIndex].Cells[4].Value.ToString().Replace(".", ","));
         float  Summ             = float.Parse(DataControl.Rows[e.RowIndex].Cells[5].Value.ToString().Replace(".", ","));
         float  Mass             = float.Parse(DataControl.Rows[e.RowIndex].Cells[1].Value.ToString().Replace(".", ","));
         float  Count            = float.Parse(DataControl.Rows[e.RowIndex].Cells[2].Value.ToString().Replace(".", ","));
         float  CratesCount      = float.Parse(DataControl.Rows[e.RowIndex].Cells[3].Value.ToString().Replace(".", ","));
         ShopMaterialsRemove SMR = new ShopMaterialsRemove();
         SMR.titlebox.Text = NameData;
         SMR.ID            = String.Empty;
         SMR.Date          = String.Empty;
         SMR.Provider      = String.Empty;
         SMR.Recipient     = String.Empty;
         SMR.Price         = Price;
         SMR.Summ          = Summ;
         SMR.Mass          = Mass;
         SMR.Count         = Count;
         SMR.CratesCount   = CratesCount;
         SMR.ShowDialog(this);
     }
 }
Example #2
0
        private void RawMatResultsDaa_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string             NameData  = RawMatResultsDaa.Rows[e.RowIndex].Cells[1].Value.ToString();
            string             IDData    = RawMatResultsDaa.Rows[e.RowIndex].Cells[0].Value.ToString();
            string             DateData  = RawMatResultsDaa.Rows[e.RowIndex].Cells[7].Value.ToString();
            string             Provider  = RawMatResultsDaa.Rows[e.RowIndex].Cells[8].Value.ToString();
            string             Recipient = RawMatResultsDaa.Rows[e.RowIndex].Cells[9].Value.ToString();
            RawMaterialsRemove RMR       = new RawMaterialsRemove();

            RMR.titlebox.Text = NameData;
            RMR.ID            = IDData;
            RMR.Date          = DateData;
            RMR.Provider      = Provider;
            RMR.Recipient     = Recipient;
            RMR.ShowDialog(this);
        }