////private void dtpDate_ValueChanged(object sender, EventArgs e) ////{ //// // Update the hour property //// this.Hour = dtpDate.Value.Hour; ////} private void btnapply_Click(object sender, EventArgs e) { try { //int counter=1; if (CBoxExpert.Text == "" || CBoxMobileManufacturer.Text == "" || CBoxMobileName.Text == "" || txtOwner.Text == "") { MessageBox.Show("لطفا موارد خواسته شده را پر نمایید"); } else { var db = new linqDataContext(); var gvObj = new MainFrm(); //while (db.ChechOrderId(counter) != null) { counter++; } //while (gvObj.GVTable.Rows[3].Cells["OrederId"].Value!= null) { counter++; } //store /Convert.ToInt32(txtOrderId.Text), db.ApplyOrderOwnerDeviceTBL(Convert.ToInt32(CBSrvMan.SelectedValue.ToString()), CHBox1.Checked, CHBox2.Checked, CHBox3.Checked, false, mtxtDate.Text, Convert.ToInt32(txtpayment.Text), txtexpr.Text, txtOwner.Text, txtPhoneNumber.Text , CBoxMobileManufacturer.Text, CBoxMobileName.Text); this.Close(); } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }