private void OrderAddFrm_Load(object sender, EventArgs e) { try { // TODO: This line of code loads data into the 'common_DataSet.ShowSrvmanExpert' table. You can move, or remove it, as needed. this.showSrvmanExpertTableAdapter.Fill(this.common_DataSet.ShowSrvmanExpert); // TODO: This line of code loads data into the 'common_DataSet.ShowDeviceManufacturer' table. You can move, or remove it, as needed. this.showDeviceManufacturerTableAdapter.Fill(this.common_DataSet.ShowDeviceManufacturer); mtxtDate.Text = PersianDate.GetPersianDate(); this.FormBorderStyle = FormBorderStyle.FixedDialog; } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
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); } }