protected void btnChangePassword_Click(object sender, EventArgs e) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_uid"] = txtUID.Text; _ht["p_new_password"] = txtNewPassword.Text; _dal.ExecRawSP("xsp_master_user_main_change_password", _ht); //----------------------------------- _ht["p_login_date"] = DateTime.Now; _ht["p_flag_code"] = "CHANGE PASSWORD"; _ht["p_cre_date"] = DateTime.Now; _ht["p_cre_by"] = txtUID.Text; _ht["p_cre_ip_address"] = "127.0.0.1"; if (Request.ServerVariables["HTTP_X_FORWARDED_FOR"] == null) { _ht["p_ip_address"] = Request.ServerVariables["REMOTE_ADDR"]; } else { _ht["p_ip_address"] = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; } //insert master user login log _dal.Insert("", "xsp_master_user_login_log_insert", _ht); Response.Redirect("main.aspx"); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "fx", "fnShowErrorNotif('" + Shared.DefaultErrorMessage + "', '" + Shared.MakeSingleLine(ex) + "');", true);; } }
//protected void btnSave_Click(object sender, EventArgs e) //{ // //commit data on gridview target // CommitSaveData(); // string script = Shared.GenerateLookUpReturnString(ClientQueryString, gvwListTarget); // ScriptManager.RegisterStartupScript(this, GetType(), "fn2", script, true); //} private void CommitSaveData() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_emp_code"] = Request.Params["empcode"]; Shared.ApplyDefaultProp(_ht); _dal.ExecRawSP(SP_SAVE_NAME, _ht); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
protected void btnChangeStatus_Click(object sender, EventArgs e) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_code"] = Request.Params["subcode"]; Shared.ApplyDefaultProp(_ht); _dal.ExecRawSP("xsp_master_general_subcode_update_status", _ht); Shared.ShowSuccessGritter(this, string.Format("mastergeneralsubcode.aspx?action=edit&general_code={0}&subcode={1}", txtGeneralCode.Text, txtCode.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
protected void btnChangeStatus_Click(object sender, EventArgs e) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_code"] = Request.Params["code"]; Shared.ApplyDefaultProp(_ht); _dal.ExecRawSP("xsp_master_widget_update_status", _ht); // untuk megeksekusi sp selain dari 5 sp pokok Shared.ShowSuccessGritter(this, string.Format("masterwidget.aspx?action=edit&code={0}", txtWidgetCode.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
protected void btnResetPassword_Click(object sender, EventArgs e) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_uid"] = Request.Params["id"]; Shared.ApplyDefaultProp(_ht); _dal.ExecRawSP("xsp_master_user_main_reset_password", _ht); // untuk megeksekusi sp selain dari 5 sp pokok Shared.ShowSuccessGritter(this, string.Format("masterusermain.aspx?action=edit&id={0}", lblId.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }