private void btnColse_Click(object sender, EventArgs e)
 {
     try
     {
         this.Close();
         var db         = new linqDataContext();
         var MainFrmObj = new MainFrm();
         MainFrmObj.GVTableSrv1.DataSource = db.ShowDeviceReapairing(Convert.ToInt32(MainFrmObj.txtSelectSrvman.SelectedValue));
         MainFrmObj.GVTableSrv2.DataSource = db.ShowDeviceRepaired(Convert.ToInt32(MainFrmObj.txtSelectSrvman.SelectedValue));
     }
     catch (System.Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
        private void btnApplyPForD_Click(object sender, EventArgs e)
        {
            try
            {
                if (GVTableShowPforD.RowCount > 0)
                {
                    var db    = new linqDataContext();
                    var gvObj = new MainFrm();

                    db.SelectPartsforDevice(db.GivePartIdTakePartName(GVTableShowPforD.CurrentRow.Cells[0].Value.ToString()), Convert.ToInt32(orderIdValue), PersianDate.GetPersianDate());

                    this.Close();
                }
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
        private void btnLtoR_Click(object sender, EventArgs e)
        {
            try
            {
                if (GVTableSelectedDevice.RowCount > 0)
                {
                    var mainObj = new MainFrm();
                    var db      = new linqDataContext();

                    db.FreeDeviceSrvMan(Convert.ToInt32(GVTableSelectedDevice.CurrentRow.Cells[0].Value), null);

                    GVTableNotSelectedDevice.DataSource = db.ShowDeviceNSofSrvman();
                    GVTableSelectedDevice.DataSource    = db.ShowDeviceSofSrvman(Convert.ToInt32(idvalue));
                }
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
Esempio n. 4
0
 private void btnApply_Click_1(object sender, EventArgs e)
 {
     try
     {
         //if (txtAlarm.Text == "" || txtName.Text == "" || txtPartId.Text == "" || txtPrice.Text == "")
         //    MessageBox.Show("لطفا موارد خواسته شده را پر نمایید");
         //else
         //{
         var db = new linqDataContext();
         db.EditPart(Convert.ToInt32(txtPartId.Text), txtPartName.Text, Convert.ToInt32(txtPartPrice.Text), Convert.ToInt32(txtPartAlert.Text));
         var gvobj = new MainFrm();
         gvobj.GVTablePart.DataSource = db.ShowParts();
         this.Close();
     }
     catch (System.Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message);
     }
     //}
 }