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; } } }
public static int getInsertStoreZX(StoreOffModel st) { SqlParameter[] para = new SqlParameter[6]; para[0] = new SqlParameter("@storeid", st.Storeid); para[1] = new SqlParameter("@zxqishu", st.Zxqishu); para[2] = new SqlParameter("@zxdate", st.Zxfate); para[3] = new SqlParameter("@offReason", st.OffReason); para[4] = new SqlParameter("@Operator", st.OperatorNo); para[5] = new SqlParameter("@OperatorName", st.OperatorName); int num = DBHelper.ExecuteNonQuery("Storeoff_zx", para, CommandType.StoredProcedure); return(num); }
/// <summary> /// --ds2012--www-b874dce8700 /// </summary> /// <param name="number"></param> /// <param name="qishu"></param> /// <param name="zxname"></param> /// <param name="zxdate"></param> /// <returns></returns> public static int getInsertStoreZX(StoreOffModel st) { return(StoreOffDAL.getInsertStoreZX(st)); }