Пример #1
0
        protected void btnResetPassCode_Click(object sender, EventArgs e)
        {
            try
            {
                string passcode = txtResetNewPasscode.Text.Trim();
                string EmpID = lblEmpID.Text.Trim();
                String strHostName = Request.UserHostAddress.ToString();
                int userid = Convert.ToInt32(Session["UserID"]);
                string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
                string timezone = "";


                if (Convert.ToInt32(Session["TimeZoneID"]) == 2)
                {
                    timezone = "Eastern Standard Time";
                }
                else
                {
                    timezone = "India Standard Time";

                }
                DateTime ISTTime = TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById(timezone));

                var CurentDatetime = ISTTime;


                EmployeeBL obj = new EmployeeBL();
                bool bnew=obj.ResetPasscodeByAdmin(userid,strIp,passcode,CurentDatetime,EmpID);
                mdlResetPasscode.Hide();


            }
            catch (Exception ex)
            {

            }

        }