コード例 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            EmployeeController CallEmployee = new EmployeeController();

            string   Id             = IdTextBox.Text;
            string   First_Name     = First_NameTextBox.Text;
            string   Last_Name      = Last_NameTextBox.Text;
            DateTime Birth_Date     = ConvertToString(Birth_DateTextBox.Text);
            string   Blood_Type     = Blood_TypeTextBox.Text;
            string   Gender         = GenderTextBox.Text;
            string   Phone_Number   = Phone_NumberTextBox.Text;
            string   Marital_Status = Marital_StatusTextBox.Text;
            string   Address        = AddressTextBox.Text;
            string   Zip_Code       = Zip_CodeTextBox.Text;
            string   Email          = EmailTextBox.Text;
            //bool IsActive = IsActiveTextBox.Text;
            //int Religion_Id = ConvertToStringReligion_IdTextBox.Text;
            string Position_Id = Position_IdTextBox.Text;
            //int Village_Id = Village_IdTextBox.Text;
            string Manager_Id = Manager_IdTextBox.Text;

            //int Birth_Place = Birth_PlaceTextBox.Text;


            CallEmployee.AddEmp(Id, First_Name, Last_Name, Birth_Date, Blood_Type, Gender, Phone_Number, Marital_Status, Address, Zip_Code, Email, Position_Id, Manager_Id);
            this.Hide();
            Home main = new Home();
            //main.Show();
        }
コード例 #2
0
        protected void Add_Click(object sender, EventArgs e)
        {
            EmployeeController ec = new EmployeeController();

            ec.AddEmp(FNtb.Text, MNtb.Text, LNtb.Text, Convert.ToDateTime(DOB1.CalendarDate.Date), Convert.ToString(DDL_gender.SelectedItem.Value)
                      , Convert.ToInt32(DDL_CS.SelectedItem.Value), SSStb.Text, TINtb.Text, Citizentb.Text
                      , Mobiletb.Text, Landlinetb.Text, Street1tb.Text, Street2tb.Text, Citytb.Text, StateTb.Text, Countrytb.Text
                      , EduBacktb.Text, Certitb.Text, Emailtb.Text, Enterprisetb.Text, Convert.ToInt32(DDL_level.SelectedItem.Value),
                      LMUtb.Text, GMUtb.Text, Convert.ToDateTime(Date1.CalendarDate.Date), WorkGrouptb.Text, Convert.ToInt32(DDL_spl.SelectedItem.Value)
                      , ServiceLinetb.Text, Statustb.Text, Convert.ToInt32(Session["InsertedBy"].ToString()));
        }