Exemplo n.º 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    
        }
Exemplo n.º 2
0
 partial void DeleteLowyer(Lowyer instance);
Exemplo n.º 3
0
 partial void UpdateLowyer(Lowyer instance);
Exemplo n.º 4
0
 partial void InsertLowyer(Lowyer instance);
Exemplo n.º 5
0
		private void detach_Lowyers(Lowyer entity)
		{
			this.SendPropertyChanging();
			entity.Account = null;
		}
Exemplo n.º 6
0
		private void attach_Lowyers(Lowyer entity)
		{
			this.SendPropertyChanging();
			entity.Account = this;
		}