当前位置: 首页>>代码示例>>C#>>正文


C# ReceptionTaskBO.AddSystemUserInformation方法代码示例

本文整理汇总了C#中BussinessLogic.ReceptionTaskBO.AddSystemUserInformation方法的典型用法代码示例。如果您正苦于以下问题:C# ReceptionTaskBO.AddSystemUserInformation方法的具体用法?C# ReceptionTaskBO.AddSystemUserInformation怎么用?C# ReceptionTaskBO.AddSystemUserInformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BussinessLogic.ReceptionTaskBO的用法示例。


在下文中一共展示了ReceptionTaskBO.AddSystemUserInformation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnAddNew_Click

        private void btnAddNew_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.CheckDataBeforeInsert() == true)
                {
                    DateTime? NullDatetime = null;

                    //thong tin SystemUsers
                    aSystemUsersEN.UserGroup = cboUserGroup.SelectedIndex + 1;
                    aSystemUsersEN.Email = txtEmail.Text;
                    aSystemUsersEN.Username = txtUsername.Text;
                    aSystemUsersEN.Name = txtName.Text;
                    aSystemUsersEN.Phone = txtMobile.Text;
                    aSystemUsersEN.Password = StringUtility.md5(txtUsername.Text + "12345678");
                    aSystemUsersEN.Birthday = dtpBirthday.EditValue == null ? NullDatetime : dtpBirthday.DateTime;
                    aSystemUsersEN.Identifier1 = txtIdentifier1.Text;
                    aSystemUsersEN.Identifier2 = txtIdentifier2.Text;
                    aSystemUsersEN.Identifier3 = txtIdentifier3.Text;
                    aSystemUsersEN.Image = (Byte[])new ImageConverter().ConvertTo(pbxImage.Image, typeof(Byte[]));
                    aSystemUsersEN.Gender = Convert.ToInt32(lueGender.EditValue);
                    aSystemUsersEN.IDRefAnotherSystem = 1;// de tam
                    aSystemUsersEN.IDRefMailSystem = 1; //de tam
                    aSystemUsersEN.Type = cboType.SelectedIndex + 1;
                    aSystemUsersEN.Status = cboStatus.SelectedIndex + 1;
                    aSystemUsersEN.Disable = Convert.ToBoolean(cboDisable.Text);
                    aSystemUsersEN.Identifier1CreatedDate = dtpIdentifier1.EditValue == null ? NullDatetime : dtpIdentifier1.DateTime;
                    aSystemUsersEN.Identifier2CreatedDate = dtpIdentifier2.EditValue == null ? NullDatetime : dtpIdentifier2.DateTime;
                    aSystemUsersEN.Identifier3CreatedDate = dtpIdentifier3.EditValue == null ? NullDatetime : dtpIdentifier3.DateTime;
                    aSystemUsersEN.PlaceOfIssue1 = txtPlaceOfIssue1.Text;
                    aSystemUsersEN.PlaceOfIssue2 = txtPlaceOfIssue2.Text;
                    aSystemUsersEN.PlaceOfIssue3 = txtPlaceOfIssue3.Text;

                    //thong tin SystemUserExts

                    aSystemUsersEN.aSystemUserExts.BirthPlace = txtBirthPlace.Text;
                    aSystemUsersEN.aSystemUserExts.Hometown = txtHometown.Text;
                    aSystemUsersEN.aSystemUserExts.Address = txtAddress.Text;
                    aSystemUsersEN.aSystemUserExts.InsuranceNumber = txtInsuranceNumber.Text;
                    aSystemUsersEN.aSystemUserExts.YearJob = dtpYearJob.EditValue == null ? NullDatetime : dtpYearJob.DateTime;
                    aSystemUsersEN.aSystemUserExts.YearPayroll = dtpYearPayroll.EditValue == null ? NullDatetime : dtpYearPayroll.DateTime;
                    aSystemUsersEN.aSystemUserExts.YearUnemploymentInsurance = dtpYearUnemploymentInsuarance.EditValue == null ? NullDatetime : dtpYearUnemploymentInsuarance.DateTime;
                    aSystemUsersEN.aSystemUserExts.DifferenceContact = "";
                    aSystemUsersEN.aSystemUserExts.Type = cboSystemUserExtsType.SelectedIndex + 1;
                    aSystemUsersEN.aSystemUserExts.Status = cboSystemUserExtsStatus.SelectedIndex + 1;
                    aSystemUsersEN.aSystemUserExts.Disable = Convert.ToBoolean(cboSystemUserExtsDisable.Text);
                    aSystemUsersEN.aSystemUserExts.Recruitment = txtRecruitment.Text;
                    aSystemUsersEN.aSystemUserExts.PermanentResidence = txaPermanentResidence.Text;
                    aSystemUsersEN.aSystemUserExts.CommunistPartyDate = dtpCommunistPartyDate.EditValue == null ? NullDatetime : dtpCommunistPartyDate.DateTime;
                    aSystemUsersEN.aSystemUserExts.YouthUnionDate = dtpYouthUnionDate.EditValue == null ? NullDatetime : dtpYouthUnionDate.DateTime;
                    aSystemUsersEN.aSystemUserExts.EnlistmentDate = dtpEnlistmentDate.EditValue == null ? NullDatetime : dtpEnlistmentDate.DateTime;
                    aSystemUsersEN.aSystemUserExts.DemobilizedDate = dtpDemobilizedDate.EditValue == null ? NullDatetime : dtpDemobilizedDate.DateTime;
                    aSystemUsersEN.aSystemUserExts.YearDepartment = dtpYearDepartment.EditValue == null ? NullDatetime : dtpYearDepartment.DateTime;

                    bool martyrsFamily = chkMartysFamily.Checked == true ? true : false;
                    bool woundedFamily = chkWoundedFamily.Checked == true ? true : false;
                    bool laborFamily = chkLaborFamily.Checked == true ? true : false;

                    aSystemUsersEN.aSystemUserExts.MartyrsFamily = martyrsFamily;
                    aSystemUsersEN.aSystemUserExts.WoundedFamily = woundedFamily;
                    aSystemUsersEN.aSystemUserExts.LaborFamily = laborFamily;
                    aSystemUsersEN.aSystemUserExts.HightestAppellation = txtHightestAppellation.Text;

                    ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
                    aReceptionTaskBO.AddSystemUserInformation(aSystemUsersEN);

                    if (ckbIsEmailSync.Checked == true)
                    {
                        SystemUsersBO aSystemUsersBO = new SystemUsersBO();
                        int ret = aSystemUsersBO.InsertEmailToDatabase(txtUsername.Text, txtPassword.Text, Properties.Resources.Domain1);
                        if (ret <= 0)
                        {
                            MessageBox.Show("Chưa tạo đồng bộ được email");
                        }

                    }
                    MessageBox.Show("Thêm mới thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("frmTsk_SystemUser_Infromation.btnAddNew_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:86,代码来源:frmTsk_InsertSystemUser_Infromation.cs


注:本文中的BussinessLogic.ReceptionTaskBO.AddSystemUserInformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。