예제 #1
0
    private void NewEmp()
    {
        string en_use_yn = WebUtility.GetConfig("ENCRYPTION_USE_YN").ToUpper();
        string encryption_oneway_mode = WebUtility.GetConfig("ENCRYPTION_ONEWAY_MODE").ToUpper();

        string encryption_key = WebUtility.GetConfig("ENCRYPTION_KEY").ToUpper();


        string pw = "";
        string emp_email;
        string emp_cellphone;

        if (en_use_yn.Equals("Y"))
        {
            //pw = GetEncriptString(DEFAULT_PASS);
            pw            = FormsAuthentication.HashPasswordForStoringInConfigFile(DEFAULT_PASS, encryption_oneway_mode);
            emp_email     = DataTypeUtility.Encrypt(GetValue(txtEmail.Text), encryption_key);
            emp_cellphone = DataTypeUtility.Encrypt(GetValue(txtCell.Text), encryption_key);
        }
        else
        {
            pw            = DEFAULT_PASS;
            emp_email     = GetValue(txtEmail.Text);
            emp_cellphone = GetValue(txtCell.Text);
        }

        Biz_ctl_ctl2101 biz = new Biz_ctl_ctl2101();

        int iRet = biz.AddEmpInfo(
            Convert.ToInt32(GetRequest("txtDeptID"))
            , GetValue(txtLoginID.Text)
            , GetValue(txtLoginIP.Text)
            , pw
            , GetValue(txtName.Text)
            , PageUtility.GetByValueDropDownList(ddlPositionClass)
            , PageUtility.GetByValueDropDownList(ddlPositionGrp)
            , PageUtility.GetByValueDropDownList(ddlPositionRank)
            , PageUtility.GetByValueDropDownList(ddlPositionDuty)
            , "-1"
            , PageUtility.GetByValueDropDownList(ddlPositionKind)
            , emp_email
            , GetValue(txtDaily.Text)
            , emp_cellphone
            , GetValue(txtFax.Text)
            , 0
            , GetValue(Utils.GetZipCode(txtZipcode1.Text, txtZipcode2.Text))
            , GetValue(txtAddr1.Text)
            , GetValue(txtAddr2.Text)
            , Utils.UploadFile(fileSign.Value, "EmpInfo.UploadImages.Sign")
            , Utils.UploadFile(fileStamp.Value, "EmpInfo.UploadImages.Stamp")
            , 0
            , gUserInfo.Emp_Ref_ID
            , 0
            , 0
            );
    }
예제 #2
0
    private void ModifyEmp(int empId)
    {
        Biz_ctl_ctl2101 biz = new Biz_ctl_ctl2101();

        string en_use_yn      = WebUtility.GetConfig("ENCRYPTION_USE_YN").ToUpper();
        string encryption_key = WebUtility.GetConfig("ENCRYPTION_KEY").ToUpper();


        string emp_email;
        string emp_cellphone;

        if (en_use_yn.Equals("Y"))
        {
            emp_email     = DataTypeUtility.Encrypt(GetValue(txtEmail.Text), encryption_key);
            emp_cellphone = DataTypeUtility.Encrypt(GetValue(txtCell.Text), encryption_key);
        }
        else
        {
            emp_email     = GetValue(txtEmail.Text);
            emp_cellphone = GetValue(txtCell.Text);
        }



        int iRet = biz.EditEmpInfo(
            Convert.ToInt32(GetValue(hfPrevDeptID.Value))
            , Convert.ToInt32(GetRequest("txtDeptID"))
            , Convert.ToInt32(empId)
            , GetValue(txtLoginID.Text)
            , GetValue(txtLoginIP.Text)
            , GetValue(txtName.Text)
            , PageUtility.GetByValueDropDownList(ddlPositionClass)
            , PageUtility.GetByValueDropDownList(ddlPositionGrp)
            , PageUtility.GetByValueDropDownList(ddlPositionRank)
            , PageUtility.GetByValueDropDownList(ddlPositionDuty)
            , "-1"
            , PageUtility.GetByValueDropDownList(ddlPositionKind)
            , emp_email
            , GetValue(txtDaily.Text)
            , emp_cellphone
            , GetValue(txtFax.Text)
            , 0
            , GetValue(Utils.GetZipCode(txtZipcode1.Text, txtZipcode2.Text))
            , GetValue(txtAddr1.Text)
            , GetValue(txtAddr2.Text)
            , Utils.UploadFile(fileSign.Value, "EmpInfo.UploadImages.Sign")
            , Utils.UploadFile(fileStamp.Value, "EmpInfo.UploadImages.Stamp")
            , 0
            , 0
            , 0
            , gUserInfo.Emp_Ref_ID
            );
    }