/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht["User_Account"] = this.User_Account.Text.Trim(); ht["User_Name"] = this.User_Name.Text.Trim(); ht["User_Sex"] = User_Sex.Value; ht["Email"] = Email.Value; ht["Title"] = Title.Value; ht["Theme"] = Theme.Value; ht["User_Remark"] = User_Remark.Value; ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = Request.Cookies["dladmin_COOKIE"]["User_ID"].ToString(); ht["ModifyUserName"] = Request.Cookies["dladmin_COOKIE"]["User_Name"].ToString(); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("ABase_UserInfo", "User_ID", Request.Cookies["dladmin_COOKIE"]["User_ID"].ToString(), ht); if (IsOk) { ShowMsgHelper.AlertClose("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 编辑按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click(object sender, EventArgs e) { string AdminHotelid = RequestSession.GetSessionUser().AdminHotelid.ToString(); Hashtable hy = new Hashtable(); hy["xm"] = txtName.Value; hy["xb"] = "M"; hy["kh"] = txtPhone.Value; hy["hylx"] = ddlMemberLevel.SelectedValue; hy["sjhm"] = txtPhone.Value; hy["hyklx"] = "T"; hy["Carid"] = ""; hy["headimgurl"] = ""; hy["AdminHotelid"] = AdminHotelid; hy["scmcode"] = "WX"; hy["krlxcode"] = "WX"; hy["skkh"] = txtPhone.Value; hy["czyh"] = "999999"; hy["zzbj"] = "F"; hy["gj"] = "CN"; hy["bmcode"] = "99"; hy["bz"] = txtNote.Value; hy["addtime"] = txtCreateTime.Value; int ss = DataFactory.SqlDataBase(AdminHotelid).InsertByHashtable("hy_hyzlxxb", hy); if (ss > 0) { ShowMsgHelper.AlertClose("添加成功!"); } else { ShowMsgHelper.AlertClose("添加失败!"); } }