コード例 #1
0
ファイル: Clerk_Show.cs プロジェクト: mr-amini/Almas
 private void elButton8_Click(object sender, EventArgs e)
 {
     string sex = elRadioButton2.Checked == true ? "خانم" : "آقای";
     if(extramessage_frm.Show("آیا مایل به حذف " + sex + " " + elEntryBox2.Value.ToString() + " " + elEntryBox3.Value.ToString() + " می باشید ؟ ",MessageBoxButtons.YesNo, MessageBoxIcon.Error) == System.Windows.Forms.DialogResult.Yes)
     {
         BLL.cleark clrk = new BLL.cleark();
         clrk.Delete(elEntryBox1.Value.ToString());
         elButton6_Click(null, null);
         Modal1.Close();
     }
 }
コード例 #2
0
ファイル: Clerk_Frm.cs プロジェクト: mr-amini/Almas
        //store final clerk data in db
        private void elButton1_Click(object sender, EventArgs e)
        {
            if (Check_Empty_Entrybox())
            {
                if (extramessage_frm.Show("آیا مایل به ثبت اطلاعات این منشی هستید ؟ ", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes)
                {
                    byte sex = (elRadioButton1.Checked == true) ? (byte)0 : (byte)1;
                    byte insurance = (elCheckBox1.Checked == true) ? (byte)1 : (byte)0;
                    //search checked item in elentrybox23 and save item.key in new string
                    string disease = _PublicClass.Fetch_Checked_Item(elEntryBox23.CheckedItems);

                    BLL.cleark crk = new BLL.cleark();
                    if (crk.Insert((string)elEntryBox1.Value, (string)elEntryBox2.Value, (string)elEntryBox3.Value,
                        (string)elEntryBox4.Value, (string)elEntryBox5.Value, (string)elEntryBox6.Value, sex,
                        (string)elEntryBox7.Value, byte.Parse(elEntryBox8.SelectedKey.ToString()), byte.Parse(elEntryBox9.SelectedKey.ToString()),
                        int.Parse(elEntryBox10.SelectedKey.ToString()), int.Parse(elEntryBox11.SelectedKey.ToString()), int.Parse(elEntryBox12.SelectedKey.ToString()),
                        int.Parse(elEntryBox13.SelectedKey.ToString()), int.Parse(elEntryBox14.SelectedKey.ToString()), (string)elEntryBox15.Value,
                        (string)elEntryBox16.Value, (string)elEntryBox17.Value, (string)elEntryBox18.Value,
                        int.Parse(elEntryBox19.Value.ToString()), (string)elEntryBox20.Value, insurance, (string)elEntryBox21.Value, (string)elEntryBox22.Value, disease))
                    {
                        //save user image into db [ image table ]
                        BLL.picture _Pic = new BLL.picture();
                        _Pic.InsertPicture((string)elEntryBox1.Value, pictureBox1.Image);
                        //empty all of elentrybox and combobox and picturebox
                        elButton2_Click(null, null);
                    }
                }
            }
        }