protected void btnquery_Click(object sender, EventArgs e) { string storeid = txtStoreid.Text.Trim(); //判断会员是否存在 if (!StoreRegisterConfirmBLL.CheckStoreId(storeid)) { LabelResponse.Text = "<font color='red'>" + GetTran("000388", "服务机构") + "" + storeid + "" + GetTran("000801", "不存在,请重新输入") + "!</font>"; return; } if (StoreOffBLL.getStoreZX(storeid) > 0) { int con1 = StoreOffBLL.getStoreISzx(storeid); //判断会员是否已注销 if (con1 == 2) { LabelResponse.Text = "<font color='red'>" + GetTran("000388", "服务机构") + "" + storeid + "" + GetTran("001310", "已经注销,不需要再次注销了") + "!</font>"; return; } } DateTime nowTime = DateTime.Now.AddHours(Convert.ToDouble(Session["WTH"])); string offReason = txtMemberOffreason.Text; StoreOffModel st = new StoreOffModel(); st.Storeid = storeid; st.Zxqishu = CommonDataBLL.getMaxqishu(); st.Zxfate = DateTime.UtcNow; st.OffReason = txtMemberOffreason.Text; st.OperatorNo = txtOperatorNo.Text; st.OperatorName = txtOperatorName.Text; DataTable dt_one = DAL.DBHelper.ExecuteDataTable("select StoreState from StoreInfo where StoreID='" + txtStoreid.Text + "'"); string StoreState = dt_one.Rows[0]["StoreState"].ToString();//汇款id if (StoreState == "0") { msg = "<script>alert('该服务机构未激活,无法注销!');</script>"; return; } else { int insertCon = StoreOffBLL.getInsertStoreZX(st); if (insertCon > 0) { msg = "<script language='javascript'>alert('" + GetTran("007983", "注销服务机构成功") + "!');window.location.href='StoreOffView.aspx';</script>"; return; } } }
protected void givTWmember_RowCommand(object sender, GridViewCommandEventArgs e) { string[] args = e.CommandArgument.ToString().Split(':'); if (args.Length != 3) { ScriptHelper.SetAlert(Page, GetTran("001089", "数据异常!")); return; } if (args[2].Trim() == "2") { ScriptHelper.SetAlert(Page, GetTran("000000", "服务机构已经恢复注销!")); return; } int id = Convert.ToInt32(args[0]); string storeid = args[1]; string Operator = Session["Company"].ToString(); string OperatorName = DataBackupBLL.GetNameByAdminID(Operator); if (e.CommandName == "OK") { int insertCon = StoreOffBLL.getUpdateStoreZX(storeid, CommonDataBLL.getMaxqishu(), id, DateTime.UtcNow, Operator, OperatorName); if (insertCon > 0) { ScriptHelper.SetAlert(Page, GetTran("001338", "确定完成")); } else { ScriptHelper.SetAlert(Page, GetTran("007132", "恢复注销失败")); } btnSeach_Click(null, null); } }