コード例 #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            
              #region " Check  All Values First "
            // Your Code Here 
            if (txtLowyerName.Text == string.Empty)
            { MessageBox.Show("أدخل الاسم الان  وبعدها يمكن لك التعديل او اكمال البيانات لاحقا"); return; }
            #endregion 
            
            
            #region " Check Current Lowyer if exiseted or not "

            // Your Code Here 
            Lowyer low = cmd.GetLowyerByName(txtLowyerName.Text);
            if (low != null) { MessageBox.Show(" موجود بالفعل "); ClearValues(); txtLowyerName.Focus(); return; }
            #endregion
            #region "            Save New Lowyer                         "
      
            Lowyer lowyer = new Lowyer() 
            {
                LowyerName = txtLowyerName.Text,
                Address = txtAddress.Text, 
                Mobile=txtMobile.Text,
                Phone=txtPhone.Text,
                Status = "Active",
                Description = txtDescription.Text
            };

            cmd.NewLawyer(lowyer);
            MessageBox.Show("تــم الـحـفظ");

            #endregion    
        }
コード例 #2
0
ファイル: Db.designer.cs プロジェクト: abuehab/TheCourtSystem
 partial void DeleteLowyer(Lowyer instance);
コード例 #3
0
ファイル: Db.designer.cs プロジェクト: abuehab/TheCourtSystem
 partial void UpdateLowyer(Lowyer instance);
コード例 #4
0
ファイル: Db.designer.cs プロジェクト: abuehab/TheCourtSystem
 partial void InsertLowyer(Lowyer instance);
コード例 #5
0
ファイル: Db.designer.cs プロジェクト: abuehab/TheCourtSystem
		private void detach_Lowyers(Lowyer entity)
		{
			this.SendPropertyChanging();
			entity.Account = null;
		}
コード例 #6
0
ファイル: Db.designer.cs プロジェクト: abuehab/TheCourtSystem
		private void attach_Lowyers(Lowyer entity)
		{
			this.SendPropertyChanging();
			entity.Account = this;
		}