Пример #1
0
 private void editbranchbtn_Click(object sender, EventArgs e)
 {
     if (editlocationtxt.Text == String.Empty)
     {
         MessageBox.Show("Fill all Fields", "Required", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (editcomboadmin.SelectedIndex > 0)
         {
             B.Br_Admin_ID = itemid[editcomboadmin.SelectedIndex];
         }
         B.Location = editlocationtxt.Text;
         ServiceBranch.BranchServiceClient s    = new ServiceBranch.BranchServiceClient();
         ServiceBranch.Branchdata          data = new ServiceBranch.Branchdata();
         data = s.updateBranch(B);
         if (data != null)
         {
             MessageBox.Show("Edit Successfully", "Edit", MessageBoxButtons.OK, MessageBoxIcon.Information);
             Load_data();
             AddPanel.Hide();
             EditPanel.Hide();
             List.Show();
         }
         else
         {
             MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #2
0
 private void btnSubjectEditCancel_Click(object sender, EventArgs e)
 {
     subjectDetails.Show();
     btnSubjectEdit.Show();
     EditPanel.Hide();
     btnEdit2Main.Hide();
 }
Пример #3
0
        private void branchaddbtn_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtlocation.Text) && combobr_adminList.SelectedIndex > 0)
            {
                int br_admin_id = itemid[combobr_adminList.SelectedIndex];
                ServiceBranch.BranchServiceClient c = new ServiceBranch.BranchServiceClient();
                ServiceBranch.Branch d = new ServiceBranch.Branch();
                d.Location    = txtlocation.Text;
                d.Br_Admin_ID = br_admin_id;
                d             = c.addBranch(d);
                if (d != null && d.Id > 0)
                {
                    MessageBox.Show("Add Sucessfully", "Branch Added !", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Load_data();
                    AddPanel.Hide();
                    EditPanel.Hide();
                    List.Show();
                }
                else
                {
                    MessageBox.Show("Fail", "Fail !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            else
            {
                MessageBox.Show("Fill all Fields", " Info !", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #4
0
 private void AddBranch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     AllBranch.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
     AddBranch.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline;
     List.Hide();
     EditPanel.Hide();
     AddPanel.Show();
 }
Пример #5
0
 public Subject()
 {
     InitializeComponent();
     createNewPanel.Hide();
     btnSubjectMain.Hide();
     EditPanel.Hide();
     btnEdit2Main.Hide();
     FillClassList();
 }
Пример #6
0
        private void ChoosePanel(string panel)
        {
            if (panel.Equals("order"))
            {
                OrderPanel.Show();
                EditPanel.Hide();
            }

            else
            {
                EditPanel.Show();
                OrderPanel.Hide();
            }
        }
Пример #7
0
        private void editbranchbtn_Click(object sender, EventArgs e)
        {
            B.Br_Admin_ID = UserInfo.id;
            B.Location    = editlocationtxt.Text;
            ServiceBranch.BranchServiceClient s    = new ServiceBranch.BranchServiceClient();
            ServiceBranch.Branchdata          data = new ServiceBranch.Branchdata();
            data = s.updateBranch(B);
            if (data != null)
            {
                MessageBox.Show("Edit Successfully", "Edit", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Load_data();
                List.Show();

                EditPanel.Hide();
            }
            else
            {
                MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }