internal static DataSet GetFXData_j_g_ye(string yydh, string qymc, string type, string czy_temp, string ls_cond, string czsj, string xxzs) { DataSet ds = null; BLL.Common B_common = new Hotel_app.BLL.Common(); string url = common_file.common_app.service_url + "BBfx/BBfx_app.asmx"; object[] args = new object[7]; args[0] = common_file.common_app.yydh; args[1] = common_file.common_app.qymc; args[2] = type; args[3] = common_file.common_app.czy; args[4] = ls_cond; args[5] = DateTime.Now.ToString(); args[6] = xxzs; Hotel_app.Server.BBfx.B_g_j_fx B_g_j_fx_services = new Hotel_app.Server.BBfx.B_g_j_fx(); string result = B_g_j_fx_services.get_g_j_ye(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "get_g_j_ye", args); if (result != null && result == common_file.common_app.get_suc) { string select_str = " id>=0 and czy_temp='" + czy_temp + "' and yydh='" + common_file.common_app.yydh + "' "; if (ls_cond.Trim() != "") { select_str += ls_cond; } ds = B_common.GetList(" select * from BBfx_s_g_j_ye_ls ", select_str); } return(ds); }
/// <summary> /// 删除时批量添加 到Qskyd_mainrecord_temp表 /// </summary> /// //public static string Pladd(string lsbh_old, string lsbh_new, string ddbh_new, string czy, string czsj) public static string Pladd(string yydh, string qymc, string lsbh_old, string lsbh_new, string ddbh_new, string czy, string czsj, string krxm, string sktt) { string s = common_app.get_failure; BLL.Common B_common = new Hotel_app.BLL.Common(); StringBuilder strSql = new StringBuilder(); strSql.Append("insert into Qskyd_mainrecord(yydh,qymc,lsbh,ddbh,is_top,is_select,hykh,hyrx,krxm,tlkr,krgj,krmz,yxzj,zjhm,krxb,krsr,krdh,krsj,krEmail,krdz,krjg,krdw,krzy,cxmd,qzrx,qzhm,zjyxq,tlyxq,tjrq,lzka,krly,xyh,xydw,xsy,ddrx,ddwz,zyzt,krrx,kr_children,ddsj,lzts,lksj,qtyq,czy,czsj,cznr,shsc,sktt,yddj,ffshys,main_sec,sdcz,syzd,vip_type,tsyq,ddly)"); strSql.Append(" select yydh,qymc,'" + lsbh_new + "','" + ddbh_new + "',is_top,is_select,hykh,hyrx,krxm,tlkr,krgj,krmz,yxzj,zjhm,krxb,krsr,krdh,krsj,krEmail,krdz,krjg,krdw,krzy,cxmd,qzrx,qzhm,zjyxq,tlyxq,tjrq,lzka,krly,xyh,xydw,xsy,ddrx,ddwz,zyzt,krrx,kr_children,ddsj,lzts,lksj,qtyq,'" + czy + "','" + czsj + "','" + common_app.chinese_add + "','" + "0" + "',sktt,yddj,'" + "0" + "','" + common_app.main_sec_main + "',sdcz,syzd,vip_type,tsyq,ddly from Qskyd_mainrecord"); strSql.Append(" where lsbh='" + lsbh_old + "'"); string krxm0 = ""; string sktt0 = ""; DataSet DS_temp = B_common.GetList("select sktt,krxm from Qskyd_mainrecord", " lsbh='" + lsbh_old + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { krxm0 = DS_temp.Tables[0].Rows[0]["krxm"].ToString(); sktt0 = DS_temp.Tables[0].Rows[0]["sktt"].ToString(); } Hotel_app.Server.Qyddj.Q_ff_xyxf Q_ff_xyxf_new = new Hotel_app.Server.Qyddj.Q_ff_xyxf(); Q_ff_xyxf_new.Qyddj_otherfee_add(yydh, qymc, lsbh_new, krxm0, sktt0, "", czy); if (B_common.ExecuteSql(strSql.ToString()) > 0) { s = common_app.get_suc; } return(s); }
//记账,挂账统计分析 //Type是common_bb中的固定值 public static DataSet GetFXData_j_g(string yydh, string qymc, string cssj, string jssj, string sel_cond, string type, string czy, string czsj, string xxzs) { DataSet ds = null; BLL.Common B_common = new Hotel_app.BLL.Common(); string url = common_file.common_app.service_url + "BBfx/BBfx_app.asmx"; object[] args = new object[9]; args[0] = common_file.common_app.yydh; args[1] = common_file.common_app.qymc; args[2] = cssj.ToString(); args[3] = jssj.ToString(); args[4] = sel_cond; args[5] = type; args[6] = czy; args[7] = czsj; args[8] = xxzs; Hotel_app.Server.BBfx.B_g_j_fx B_g_j_fx_services = new Hotel_app.Server.BBfx.B_g_j_fx(); string result = B_g_j_fx_services.get_g_j_fx_app(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "get_g_j_fx_app", args); if (result != null && result == common_file.common_app.get_suc) { string select_str = " id>=0 and type='" + type + "' and czy_temp='" + czy + "' and yydh='" + common_file.common_app.yydh + "' "; if (sel_cond.Trim() != "") { select_str += sel_cond; } ds = B_common.GetList(" select * from BS_g_j_fx ", select_str); } return(ds); }
public static int get_zfs() { int zfs = 1; BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select id from Ffjzt", "id>=0"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { zfs = DS_temp.Tables[0].Rows.Count; } DS_temp = B_Common.GetList("select tjkffs from Qcounter", "id>=0"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { if (int.Parse(DS_temp.Tables[0].Rows[0]["tjkffs"].ToString()) > 0) { zfs = zfs - int.Parse(DS_temp.Tables[0].Rows[0]["tjkffs"].ToString()); } } if (zfs < 1) { zfs = 1; } DS_temp.Clear(); DS_temp.Dispose(); return(zfs); }
public void add_hy_info_01(string hykh_bz_input, bool shdk, ref TextBox TB_hykh_bz, ref TextBox TB_hyrx, ref TextBox TB_krxm, ref TextBox TB_hyjf) { string hykh_bz = ""; if (shdk == true) { hykh_bz = get_hykh(); } else { hykh_bz = hykh_bz_input; } if (hykh_bz != "") { BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select * from Hhygl", "hykh_bz='" + hykh_bz + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { TB_hykh_bz.Text = DS_temp.Tables[0].Rows[0]["hykh_bz"].ToString(); TB_krxm.Text = DS_temp.Tables[0].Rows[0]["krxm"].ToString(); TB_hyrx.Text = DS_temp.Tables[0].Rows[0]["hyrx"].ToString(); TB_hyjf.Text = common_file.common_hy.SumJF(DS_temp.Tables[0].Rows[0]["hykh"].ToString()).ToString(); } } }
private void b_exportToExcel_Click(object sender, EventArgs e) { //先处理要导出的DS BLL.Common B_common = new Hotel_app.BLL.Common(); DataSet ds_0 = null; if (DS_ttyd_qx.Tables[0].Rows.Count > 0) { ds_0 = DS_ttyd_cy.Clone(); for (int i = 0; i < DS_ttyd_qx.Tables[0].Rows.Count; i++) { string ddbh = DS_ttyd_qx.Tables[0].Rows[i]["ddbh"].ToString(); DataRow dr = ds_0.Tables[0].NewRow(); dr["lsbh"] = DS_ttyd_qx.Tables[0].Rows[i]["lsbh"].ToString(); dr["ddbh"] = DS_ttyd_qx.Tables[0].Rows[i]["ddbh"].ToString(); dr["krxm"] = DS_ttyd_qx.Tables[0].Rows[i]["krxm"].ToString(); dr["hykh"] = DS_ttyd_qx.Tables[0].Rows[i]["krbh"].ToString(); dr["yddj"] = DS_ttyd_qx.Tables[0].Rows[i]["yddj"].ToString(); dr["sktt"] = "团体主单"; dr["krly"] = DS_ttyd_qx.Tables[0].Rows[i]["krly"].ToString(); dr["xyh"] = DS_ttyd_qx.Tables[0].Rows[i]["xyh"].ToString(); dr["xydw"] = DS_ttyd_qx.Tables[0].Rows[i]["xydw"].ToString(); dr["krdh"] = DS_ttyd_qx.Tables[0].Rows[i]["krdh"].ToString(); dr["krsj"] = DS_ttyd_qx.Tables[0].Rows[i]["krsj"].ToString(); dr["tlkr"] = "预订人姓名:" + DS_ttyd_qx.Tables[0].Rows[i]["ydrxm"].ToString(); dr["ddsj"] = DS_ttyd_qx.Tables[0].Rows[i]["ddsj"].ToString(); dr["lksj"] = DS_ttyd_qx.Tables[0].Rows[i]["lksj"].ToString(); ds_0.Tables[0].Rows.Add(dr); } if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0) { common_file.common_DataSetToExcel.ExportMX(ds_0, "skyd_qx", "团队未到内容导出"); } } }
//用于记录夜审时库存生成的日期 renew_tj_kc指示是否重新重计出库 public string kc_fx(string yydh, string qymc, string czsj, string _renew_tj_kc, string czy_temp, string xxzs) { string s = common_file.common_app.get_suc; BLL.Common B_Common = new Hotel_app.BLL.Common(); int i = 0; //首先要查询当天是否有统计过 DataSet ds = B_Common.GetList(" select * from sqs_ck_tj_date ", " czsj between '" + DateTime.Parse(czsj).ToShortDateString() + "' and '" + DateTime.Parse(czsj).ToShortDateString() + " 23:59:59" + "'"); if ((ds == null || (ds != null && ds.Tables[0].Rows.Count <= 0))) { DbHelperSQL.ExecuteSql(" insert into sqs_ck_tj_date(yydh,qymc,tj_rq,czsj,bz) values('" + yydh + "','" + qymc + "','" + DateTime.Parse(czsj).Date.AddDays(-1) + "','" + czsj + "','新增出库统计成功')"); i = 1; } else { //更新操作时间以及备注信息 B_Common.ExecuteSql(" update sqs_ck_tj_date set czsj='" + czsj + "',bz='" + ds.Tables[0].Rows[0]["bz"].ToString() + "|由于重做夜审,更新当天的统计时间' where id='" + ds.Tables[0].Rows[0]["id"].ToString() + "' "); i = 1; } if (i == 1) { Record_kc_tj_mx(yydh, qymc, czsj, czy_temp); } s = common_file.common_app.get_suc; //Gen_r_kc_bb(yydh, qymc, czsj, "", czy_temp, xxzs); return(s); }
private DataSet Get_zdylData(string cssj, string jssj, string sel_cond) { //qymc, yydh, cssj, jssj, czy_temp, czsj, xxzs DataSet ds = null; BLL.Common B_common = new Hotel_app.BLL.Common(); string url = common_file.common_app.service_url + "BBfx/BBfx_app.asmx"; object[] args = new object[7]; args[0] = common_file.common_app.qymc; args[1] = common_file.common_app.yydh; args[2] = cssj.ToString(); args[3] = jssj.ToString(); args[4] = common_file.common_app.czy; args[5] = DateTime.Now.ToString(); args[6] = common_file.common_app.xxzs; //object result = Hotel_app.DynamicWebServiceCall.InvokeWebService(url, "get_zzkr_ylfx_app", args); Server.BBfx.B_zdkr_ylfx B_zdkr_ylfx_new = new Hotel_app.Server.BBfx.B_zdkr_ylfx(); string result = B_zdkr_ylfx_new.Get_zdkr_ylData(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString()); if (result != null && result.ToString() == common_file.common_app.get_suc) { string select_str = " id>=0 and yydh='" + common_file.common_app.yydh + "' and lksj>='" + cssj + "' and lksj<='" + jssj + "' and main_sec='" + common_file.common_app.main_sec_main + "' and czy_temp='" + common_file.common_app.czy + "'"; if (sel_cond != "") { select_str += sel_cond; } ds = B_common.GetList(" select * from View_zdkr_ylfx_temp ", select_str); } return(ds); }
//团体的批量增加 public static string TT_plAdd(string lsbh_old, string lsbh_new, string krxm, string czy, string czsj, string xxzs) {//Hotel_app\common_file_server\Common_pl_Qskyd_mainRecord_add.cs string s = common_app.get_failure; StringBuilder strSql = new StringBuilder(); //提取Qttyd中的信息,给新增的成员赋值 strSql.Append("insert into Qskyd_mainrecord(yydh,qymc,lsbh,ddbh,is_top,is_select,krxm,krgj,krEmail,krdz,krly,xyh,xydw,xsy,ddrx,ddwz,zyzt,ddsj,lzts,lksj,qtyq,czy,czsj,cznr,shsc,sktt,yddj,ffshys,main_sec,sdcz,ddly,tsyq,syzd)"); strSql.Append(" select yydh,qymc,'" + lsbh_new + "',ddbh,is_top,is_select,'" + krxm + "',krgj,krEmail,krdz,krly,xyh,xydw,xsy,ddrx,ddwz,zyzt,ddsj,'1',lksj,qtyq,'" + czy + "','" + czsj + "','" + common_app.chinese_add + "','" + "0" + "',sktt,yddj,ffshys,'" + common_app.main_sec_main + "',sdcz,ddly,tsyq,syzd from Qttyd_mainrecord"); strSql.Append(" where lsbh='" + lsbh_old + "'"); BLL.Common B_common = new Hotel_app.BLL.Common(); if (B_common.ExecuteSql(strSql.ToString()) > 0) { string lfbh_News = common_file.common_ddbh.ddbh("lf", "lfdate", "lfcounter", 6); DataSet DS_temp = B_common.GetList("select * from Flfsz", "lsbh in (select lsbh from Qskyd_mainrecord where ddbh in(select ddbh from Qttyd_mainrecord where lsbh='" + lsbh_old + "'))"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { lfbh_News = DS_temp.Tables[0].Rows[0]["lfbh"].ToString(); } else { lfbh_News = common_file.common_ddbh.ddbh("lf", "lfdate", "lfcounter", 6); } DS_temp = B_common.GetList("select * from Qskyd_fjrb", "lsbh='" + lsbh_new + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { Hotel_app.Server.Ffjzt.Flfsz_add_edit Flfsz_add_edit_new = new Hotel_app.Server.Ffjzt.Flfsz_add_edit(); Flfsz_add_edit_new.Flfsz_add_edit_delete("", DS_temp.Tables[0].Rows[0]["yydh"].ToString(), DS_temp.Tables[0].Rows[0]["qymc"].ToString(), lfbh_News, DS_temp.Tables[0].Rows[0]["lsbh"].ToString(), DS_temp.Tables[0].Rows[0]["fjbh"].ToString(), DS_temp.Tables[0].Rows[0]["krxm"].ToString(), DS_temp.Tables[0].Rows[0]["sktt"].ToString(), DS_temp.Tables[0].Rows[0]["yddj"].ToString(), czy, czsj, false, common_app.get_add, xxzs); //(string id, string yydh, string qymc, string lfbh, string lsbh, string fjbh, string krxm, string sktt, string yddj, string czy, string czsj, bool shlz, string add_edit_delete, string xxzs) } DS_temp.Dispose(); s = common_app.get_suc; } return(s); }
public void get_gj(string fjrb) { string krly_0 = ""; string xyh_0 = ""; DateTime ddsj_0 = DateTime.Parse(common_file.common_app.cssj); DateTime lksj_0 = DateTime.Parse(common_file.common_app.cssj); string hykh = ""; string hyrx = ""; BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp_0 = B_Common.GetList("select krly,xyh,ddsj,lksj,hykh,hyrx from Qskyd_mainrecord", "lsbh='" + lsbh + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { xyh_0 = DS_temp_0.Tables[0].Rows[0]["xyh"].ToString(); krly_0 = DS_temp_0.Tables[0].Rows[0]["krly"].ToString(); ddsj_0 = DateTime.Parse(DS_temp_0.Tables[0].Rows[0]["ddsj"].ToString()); lksj_0 = DateTime.Parse(DS_temp_0.Tables[0].Rows[0]["lksj"].ToString()); hykh = DS_temp_0.Tables[0].Rows[0]["hykh"].ToString(); hyrx = DS_temp_0.Tables[0].Rows[0]["hyrx"].ToString(); } else { DS_temp_0 = B_Common.GetList("select krly,xyh,ddsj,lksj from Qttyd_mainrecord", "lsbh='" + lsbh + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { xyh_0 = DS_temp_0.Tables[0].Rows[0]["xyh"].ToString(); krly_0 = DS_temp_0.Tables[0].Rows[0]["krly"].ToString(); ddsj_0 = DateTime.Parse(DS_temp_0.Tables[0].Rows[0]["ddsj"].ToString()); lksj_0 = DateTime.Parse(DS_temp_0.Tables[0].Rows[0]["lksj"].ToString()); } } DS_temp_0.Clear(); DS_temp_0.Dispose(); tB_fjjg.Text = common_file.common_get_fjjg.get_fjjg(fjrb, krly_0, xyh_0, ddsj_0, lksj_0, hykh, hyrx); }
//判断输入框是否为空 public static bool get_judge_void(TextBox TB_ls, string judge_type, string massage_content) { BLL.Common B_Common_temp = new Hotel_app.BLL.Common(); DataSet DS_temp_0 = B_Common_temp.GetList("select id from X_judge_void", "judge_type='" + judge_type + "' and judge_value=1 and yydh='" + common_file.common_app.yydh + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (TB_ls.Text.Trim() != "") { return(true); } else { common_file.common_app.Message_box_show(common_file.common_app.message_title, massage_content); TB_ls.Focus(); DS_temp_0.Dispose(); return(false); } } else { return(true); } }
//判断是否记录里面有否重复的字段 /// <summary> /// /// </summary> /// <param name="table_name">表名</param> /// <param name="object_name">字段名</param> /// <param name="massage_content">提示信息</param> /// <param name="input_content">输入框内容</param> /// <param name="judge_add_edit">新增或修改</param> /// <param name="id_temp">所选择字段的ID</param> /// <returns></returns> public static int get_judge_repeat(string table_name, string object_name, string massage_content, string input_content, string judge_add_edit, string id_temp) { int judge_save = 3; BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select count(id) as sl from " + table_name, object_name + "='" + input_content + "'" + common_file.common_app.yydh_select + ""); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { if (Convert.ToDecimal(DS_temp.Tables[0].Rows[0]["sl"].ToString()) > 0) { judge_save = 4; if (judge_add_edit == common_file.common_app.get_edit) { DS_temp = B_Common.GetList("select id from " + table_name, object_name + "='" + input_content + "'" + common_file.common_app.yydh_select + ""); if (DS_temp.Tables[0].Rows[0]["id"].ToString() == id_temp) { judge_save = 3; } } if (judge_save == 4) { common_file.common_app.Message_box_show(common_file.common_app.message_title, massage_content); } } } DS_temp.Dispose(); return(judge_save); //if (judge_save == 3) return true; //else return false; }
public static void sub_menu_ddi_is_visible(ToolStripItem item, string user_type) { common_file.common_app.get_czsj(); BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp; ToolStripMenuItem pItem = (ToolStripMenuItem)item; for (int j_0 = 0; j_0 < pItem.DropDownItems.Count; j_0++) { DS_temp = B_Common.GetList("select * from YH_RolePermission", " p_lsbh='" + pItem.DropDownItems[j_0].Name.ToString() + "' and p_value=1 and R_lsbh='" + user_type + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { pItem.DropDownItems[j_0].Enabled = true; } else { pItem.DropDownItems[j_0].Enabled = false; } if (pItem.DropDownItems[j_0].GetType().ToString() == "System.Windows.Forms.ToolStripMenuItem") { sub_menu_ddi_is_visible(pItem.DropDownItems[j_0], user_type); } } Cursor.Current = Cursors.Default; }
private void Getlskr(string time_start, string time_end, string jfsx, string krxm) { DataSet ds_lskr = null; string sql_con = ""; float costTotal = 0; if (jfsx.Trim() == "") { costTotal = 0; } else { costTotal = float.Parse(tb_jfsx.Text.Trim()); } sql_con = " id>=0 and yydh='" + common_file.common_app.yydh + "' and xfdr='" + Szwgl.common_zw.dr_ff + "' and zjhm!='' and xfsj>='" + time_start + "' and xfsj<='" + time_end + "' and krxm like '%" + krxm + "%' group by krxm,yxzj,zjhm having sum(sjxfje)>=" + costTotal; BLL.Common B_common = new Hotel_app.BLL.Common(); ds_lskr = B_common.GetList("select krxm,yxzj,zjhm,sum(sjxfje) as totalCost from View_ssyxfmx_lskr_mx ", sql_con); if (ds_lskr != null && ds_lskr.Tables[0].Rows.Count > 0) { this.DialogResult = DialogResult.OK; Q_lskr_xf Q_lskr_xf_new = new Q_lskr_xf(ds_lskr, time_start, time_end); Q_lskr_xf_new.StartPosition = FormStartPosition.CenterScreen; Q_lskr_xf_new.MdiParent = common_file.common_form.Fmain_new; Q_lskr_xf_new.Show(); } else { common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,没有任何会员的历史消费额达到当前的设置的消费上限值!"); } }
//当日出库(库存--出库 在表Ssyxfmx中jjje和sjxfje表示的都为总价,在表Xxfmx中都按单价处理) private void Get_kc_ck(string qymc, string yydh, string mxbh, string czsj, string czy_temp, decimal dj_qc, ref decimal sl_r_ck) { decimal xf_Today_sl = 0, xf_Today_cb = 0, xf_Today_yye = 0; DataSet ds; sl_r_ck = 0; string tj_rq = (DateTime.Parse(czsj).AddDays(-1)).ToShortDateString();//出库的日期 BLL.Common B_common = new Hotel_app.BLL.Common(); //获取当日的出库数量 string sel_s = " yydh='" + yydh + "' and xfsj>='" + tj_rq + "' and xfsj<'" + DateTime.Parse(czsj).ToShortDateString() + "' and ischecked='1' and mxbh='" + mxbh + "'"; ds = B_common.GetList(" select * from Ssyxfmx_kc_sh_temp ", sel_s); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { xf_Today_sl += decimal.Parse(ds.Tables[0].Rows[i]["xfsl"].ToString()); xf_Today_yye += decimal.Parse(ds.Tables[0].Rows[i]["xfje"].ToString()); } xf_Today_cb = xf_Today_sl * dj_qc; sl_r_ck = xf_Today_sl; } StringBuilder sb = new StringBuilder(); sb.Append(" insert into BB_kc_mx(yydh,qymc,xfdr,drbh,xfxr,xrbh,xfxm,mxbh,sl,rq,xftm,jjdj,xsdj,yhbl,sjxsdj,Total_cb,Total_yye,rx,xfsj) "); sb.Append(" select yydh,qymc,xfdr,drbh,xfxr,xrbh,xfmx,mxbh,'" + xf_Today_sl + "','" + tj_rq + "',xftm,'" + dj_qc + "',xfje,1,xfje,'" + xf_Today_cb + "','" + xf_Today_yye + "','" + Xxtsz.common_kc.kc_rx_ck_r + "','" + tj_rq + "' from Xxfmx "); sb.Append(" where yydh='" + yydh + "' and mxbh='" + mxbh + "'"); //sb.Append(sel_s); B_common.ExecuteSql(sb.ToString()); common_file.common_czjl.add_czjl(yydh, qymc, czy_temp, Xxtsz.common_kc.kc_rx_ck_r, DateTime.Parse(czsj).AddDays(-1).ToShortDateString(), "新增", DateTime.Parse(czsj)); }
public dgvprint_app(string lsbh, string sel_con, string _loadType, DataSet _ds_print) { loadType = _loadType; this.ds_print = _ds_print; this.lsbh = lsbh; this.sel_con = sel_con; //单张单子打印(保留) if (lsbh.Trim() != "" && loadType == "single") { if (sel_con.Trim() != "") { sel_con = " and " + sel_con + " "; } BLL.Common B_common = new Hotel_app.BLL.Common(); ds_print = B_common.GetList(" select * from Szw_temp ", "id>=0 " + common_file.common_app.yydh_select + " and lsbh='" + lsbh + "' and czy_temp='" + common_file.common_app.czy + "' " + sel_con + " order by xfsj desc"); //print(); } //区域打印 if (lsbh.Trim() == "" && loadType == "multi" && ds_print != null && ds_print.Tables[0].Rows.Count > 0) { print(); } if (lsbh.Trim() != "" && loadType == "jbmx" && ds_print != null && ds_print.Tables[0].Rows.Count > 0) { print(); } if (lsbh.Trim() != "" && loadType == "jkmx" && ds_print != null && ds_print.Tables[0].Rows.Count > 0) { print(); } }
string zz_lsbh = "";//common_file.common_ddbh.ddbh("zwzz","jzdate","jzcounter",6)+DateTime.Now.ToString(); //jzbh = common_file.common_ddbh.ddbh("szcz", "jzdate", "jzcounter", 6) public string GetjzOrgzOrZaizToZzResult(string lsbh_old, string jzbh_old, string lsbh_new, string sk_tt, string Zz_Type, string yydh, string czy, string czy_bc, string czsj, string syzd, string xxzs, string qymc, string czy_GUID) { //lsbh_new和lsbh_old在前台去判断(old是转前的lsbh,new是帐务转到的lsbh //Zz_Type 是指转的类型 (从帐务转进来有:jz-tt,jz-sk;gz-tt,gz-sk sk-sk,sk-tt,tt-sk,tt-tt(后面四种是针对在住转在住的) //sk_tt 是指转帐的主体是散客还是团体(lsbh_old类型,sk or tt) //注意,记、挂的帐务在Szwmx和Syjcz里面都记录的相关内容 string s = common_file.common_app.get_failure; BLL.Common B_common = new Hotel_app.BLL.Common(); if (Zz_Type == common_zw.zwzz_gz_sk || Zz_Type == common_zw.zwzz_gz_tt || Zz_Type == common_zw.zwzz_jz_sk || Zz_Type == common_zw.zwzz_jz_tt) { } //在住类型的转帐(要转的帐务在Szw_zz_fj_temp里面) //if (Zz_Type == common_zw.zwzz_sk_sk || Zz_Type == common_zw.zwzz_sk_tt || Zz_Type == common_zw.zwzz_tt_sk || Zz_Type == common_zw.zwzz_tt_tt) //{ // ////先备份Szwmx到BAK中, // //strsql = new StringBuilder(); // //strsql.Append("insert into Szwmx_bak(yydh,qymc,is_top,is_select,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,czy,xfdr,xfrb,xfxm,xfbz,xfzy,xfje,yh,sjxfje,xfsl,shsc,czy_bc,czzt,czsj,syzd,is_visible,mxbh)"); // //strsql.Append(" select yydh,qymc,is_top,is_select,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,czy,xfdr,xfrb,xfxm,xfbz,xfzy,xfje,yh,sjxfje,xfsl,shsc,czy_bc,'" + Zz_Type + "',czsj,syzd,is_visible,mxbh from Szwmx"); // //strsql.Append(" where lsbh='" + lsbh_old + "' and yydh='" + yydh + "' and id_app in (select id_app from Szw_zz_fj_temp where lsbh='" + lsbh_old + "' and czy='" + czy + "') "); // //B_common.ExecuteSql(strsql.ToString());//备份在Szw_zz_fj_temp这个表里面出现的Szwmx的记录,要转到lsbh_new的 //} if (GetjzOrgzOrZaiZToZz_helper(lsbh_old, jzbh_old, lsbh_new, sk_tt, Zz_Type, yydh, czy, czy_bc, czsj, syzd, xxzs, czy_GUID) == common_file.common_app.get_suc) { s = common_file.common_app.get_suc; } common_file.common_czjl.add_czjl(yydh, qymc, czy, "当前帐务由:" + lsbh_old + "转到:" + lsbh_new + "名下", Zz_Type, Zz_Type + "转帐结果为:" + s, Convert.ToDateTime(czsj)); return(s); }
//记/挂账,明细详细分析 public static DataSet GetFXData_j_g_Mx_xx(string yydh, string qymc, string cssj, string jssj, string sel_cond, string type, string czy, string jzzt, string czsj, string xxzs) { //yydh, qymc, cssj, jssj, other_cond, type, jzzt, czy_temp, czsj, xxzs DataSet ds = null; BLL.Common B_common = new Hotel_app.BLL.Common(); string url = common_file.common_app.service_url + "BBfx/BBfx_app.asmx"; object[] args = new object[10]; args[0] = common_file.common_app.yydh; args[1] = common_file.common_app.qymc; args[2] = cssj.ToString(); args[3] = jssj.ToString(); args[4] = sel_cond; args[5] = type; args[6] = jzzt; args[7] = common_file.common_app.czy; args[8] = DateTime.Now.ToString(); args[9] = common_file.common_app.xxzs; Hotel_app.Server.BBfx.B_g_j_fx B_g_j_fx_services = new Hotel_app.Server.BBfx.B_g_j_fx(); string result = B_g_j_fx_services.get_g_j_mxfxData(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), args[9].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "get_g_j_mxfx_app", args); if (result == common_file.common_app.get_suc) { string select_str = " id>=0 and jzzt!='' and czy_temp='" + czy + "' and yydh='" + common_file.common_app.yydh + "' order by jzzt desc,xfsj desc "; //if (sel_cond.Trim() != "") //{ // select_str += sel_cond; //} ds = B_common.GetList(" select * from BB_g_j_mxfx_ls ", select_str); } return(ds); }
/// <summary> /// 向这张表插入临时数据 /// </summary> /// <param name="yydh"></param> /// <param name="qymc"></param> /// <param name="czy"></param> /// <param name="cssj"></param> /// <param name="jssj"></param> /// <param name="add_type"></param>///销售员xsy,协议单位xydw;客人来源krly /// <param name="xxzs"></param> public string Ssyxfmx_hy_ls_add_app(string yydh, string qymc, string czy, string cssj, string jssj, string add_type, string xxzs) { string get_result = common_file.common_app.get_failure; BLL.Common B_Common = new Hotel_app.BLL.Common(); string sql_s = ""; //if (add_type == common_bb.xsy_krly_xydw_krly || add_type == common_bb.xsy_krly_xydw_xydw || add_type == common_bb.xsy_krly_xydw_pq || add_type == common_bb.xsy_krly_xydw_krgj || add_type == common_bb.xsy_krly_xydw_gj_sf || add_type == common_bb.xsy_krly_xydw_gj_cs) //{ sql_s = "delete from BQ_syxfmx_hy_ls where yydh='" + yydh + "' and czy_temp='" + czy + "'"; B_Common.ExecuteSql(sql_s); sql_s = "insert into BQ_syxfmx_hy_ls(yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,xfsj,xfdr,xfrb,xfxm,sjxfje,xfsl,xsy,hykh,hykh_bz,czy_temp)"; sql_s = sql_s + "select yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,xfsj,xfdr,xfrb,xfxm,sjxfje,xfsl,xsy,hykh,hykh_bz,'" + czy + "' from VS_syxfmx_hyxsy where yydh='" + yydh + "' and xfsj between '" + cssj + "' and '" + jssj + "'"; B_Common.ExecuteSql(sql_s); //} //if (add_type == common_bb.xsy_krly_xydw_xsy) //{ // sql_s = "delete from BQ_syxfmx_hy_ls where czy_temp='" + czy + "'"; // B_Common.ExecuteSql(sql_s); // sql_s = "insert into BQ_syxfmx_hy_ls(yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfsj,xfdr,xfrb,xfxm,sjxfje,xfsl,xsy,krly,xydw,czy_temp)"; // sql_s = sql_s + "select yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfsj,xfdr,xfrb,xfxm,sjxfje,xfsl,xsy,krly,xydw,'" + czy + "' from VS_syxfmx_xsy where yydh='" + yydh + "' and xfsj between '" + cssj + "' and '" + jssj + "'"; // B_Common.ExecuteSql(sql_s); //} get_result = common_file.common_app.get_suc; return(get_result); }
//id,yydh,qymc,lsbh,lksj,czsj,czy,bz,drbh,xfdr,xrbh,xfxr,xfmx,mxbh,xfsl,shsc public static void Getmxbh(string mxbh, string xftm, out string drbh, out string xfdr, out string xrbh, out string xfxr, out string xfmx, out string xftm_temp, out string mxbh_temp) { string s_0 = ""; drbh = ""; xfdr = ""; xrbh = ""; xfxr = ""; xfmx = ""; xftm_temp = ""; mxbh_temp = ""; BLL.Common B_Common = new Hotel_app.BLL.Common(); if (xftm.Trim() != "") { s_0 = " xftm='" + xftm + "'"; } else { s_0 = " mxbh='" + mxbh + "'"; } DataSet DS_temp = B_Common.GetList("select * from Xxfmx", s_0); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { drbh = DS_temp.Tables[0].Rows[0]["drbh"].ToString(); xfdr = DS_temp.Tables[0].Rows[0]["xfdr"].ToString(); xrbh = DS_temp.Tables[0].Rows[0]["xrbh"].ToString(); xfxr = DS_temp.Tables[0].Rows[0]["xfxr"].ToString(); xfmx = DS_temp.Tables[0].Rows[0]["xfmx"].ToString(); xftm_temp = DS_temp.Tables[0].Rows[0]["xftm"].ToString(); mxbh_temp = DS_temp.Tables[0].Rows[0]["mxbh"].ToString(); } DS_temp.Dispose(); }
public string Sjzmx_or_bak_ls_add_app(string yydh, string qymc, string czy, string cssj, string jssj, string czzt, string xxzs) { string get_result = common_file.common_app.get_failure; BLL.Common B_Common = new Hotel_app.BLL.Common(); string sql_s = ""; sql_s = "delete from BS_jzmx_ls where yydh='" + yydh + "' and czy_temp='" + czy + "'"; B_Common.ExecuteSql(sql_s); sql_s = "delete from BS_jzmx_bak_ls where yydh='" + yydh + "' and czy_temp='" + czy + "'"; B_Common.ExecuteSql(sql_s); try { sql_s = "insert into BS_jzmx_ls(yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,xfdr,xfrb,xfxm,xfbz,xfzy,sjxfje,xfsl,czzt,tfsj,czsj,jzzt,fkfs,czy_temp)"; sql_s = sql_s + "select yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,xfdr,xfrb,xfxm,xfbz,xfzy,sjxfje,xfsl,czzt,tfsj,czsj,jzzt,fkfs,'" + czy + "' from Sjzmx where yydh='" + yydh + "' and (tfsj between '" + cssj + "' and '" + jssj + "' or czsj between '" + cssj + "' and '" + jssj + "')" + czzt; B_Common.ExecuteSql(sql_s); sql_s = "insert into BS_jzmx_bak_ls(yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,xfdr,xfrb,xfxm,xfbz,xfzy,sjxfje,xfsl,czzt,tfsj,czsj,jzzt,fkfs,czy_temp)"; sql_s = sql_s + "select yydh,qymc,id_app,jzbh,lsbh,krxm,fjrb,fjbh,sktt,xfrq,xfsj,xfdr,xfrb,xfxm,xfbz,xfzy,sjxfje,xfsl,czzt,tfsj,czsj,jzzt,fkfs,'" + czy + "' from Sjzmx_bak where yydh='" + yydh + "' and (tfsj between '" + cssj + "' and '" + jssj + "' or czsj between '" + cssj + "' and '" + jssj + "')" + czzt + common_file_server.common_jzzt.czzt_bak_not_like_tf; B_Common.ExecuteSql(sql_s); } catch { common_file.common_czjl.add_errorlog(sql_s, "", DateTime.Now.ToString()); } get_result = common_file.common_app.get_suc; return(get_result); }
//当日 sktt 分析 public string dr_yd_yl_sktt_app(string yydh, string qymc, string czy, DateTime czsj, string xxzs) { string get_result = common_file.common_app.get_failure; BLL.Common B_Common = new Hotel_app.BLL.Common(); B_Common.ExecuteSql("delete from " + "F_ftfx_sktt_ddlk where czy='" + czy + "'"); //预计到店 DataSet DS_temp = B_Common.GetList("select sktt,sum(lzfs) as lzfs from Qskyd_fjrb", "yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj between '" + DateTime.Now.ToShortDateString() + "' and '" + DateTime.Now.ToShortDateString() + " 23:59:59" + "' group by sktt"); dr_yd_yl_sktt_yd_add(yydh, qymc, common_file.common_sktt.sktt_sk, B_Common, DS_temp, "F_ftfx_sktt_ddlk", czy); dr_yd_yl_sktt_yd_add(yydh, qymc, common_file.common_sktt.sktt_cz, B_Common, DS_temp, "F_ftfx_sktt_ddlk", czy); dr_yd_yl_sktt_yd_add(yydh, qymc, common_file.common_sktt.sktt_zd, B_Common, DS_temp, "F_ftfx_sktt_ddlk", czy); dr_yd_yl_sktt_yd_add(yydh, qymc, common_file.common_sktt.sktt_tt, B_Common, DS_temp, "F_ftfx_sktt_ddlk", czy); dr_yd_yl_sktt_yd_add(yydh, qymc, common_file.common_sktt.sktt_hy, B_Common, DS_temp, "F_ftfx_sktt_ddlk", czy); //在店 dr_yd_yl_zz_update(yydh, qymc, B_Common, "F_ftfx_sktt_ddlk", "yddj='" + common_file.common_yddj.yddj_dj + "' and lksj not between '" + DateTime.Now.ToShortDateString() + "' and '" + DateTime.Now.ToShortDateString() + " 23:59:59" + "'", "zdfs", "zdrs"); //预离 dr_yd_yl_zz_update(yydh, qymc, B_Common, "F_ftfx_sktt_ddlk", "yddj='" + common_file.common_yddj.yddj_dj + "' and lksj between '" + DateTime.Now.ToShortDateString() + "' and '" + DateTime.Now.ToShortDateString() + " 23:59:59" + "'", "ylfs", "ylrs"); //合计 B_Common.ExecuteSql("insert into " + "F_ftfx_sktt_ddlk" + "(yydh,qymc,zyzt,ydfs,ydrs,zdfs,zdrs,ylfs,ylrs,czy) select '" + yydh + "','" + qymc + "','" + "合计" + "',sum(ydfs),sum(ydrs),sum(zdfs),sum(zdrs),sum(ylfs),sum(ylrs),'" + czy + "' from " + "F_ftfx_sktt_ddlk"); DS_temp.Clear(); DS_temp.Dispose(); get_result = common_file.common_app.get_suc; return(get_result); }
/// <summary> /// 团体账务提醒 /// </summary> /// <param name="lsbh"></param> public static void Qttzw_remind(string lsbh) { BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select * from X_judge_remind", "judge_ym='Syd' and judge_type='fjbm' and judge_value=1"); { if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { tt_fjbm(lsbh); } } DS_temp = B_Common.GetList("select * from X_judge_remind", "judge_ym='Syd' and judge_type='tsyq' and judge_value=1"); { if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { tt_tsyq(lsbh); } } DS_temp = B_Common.GetList("select * from X_judge_remind", "judge_ym='Syd' and judge_type='qtyq' and judge_value=1"); { if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { tt_qtyq(lsbh); } } DS_temp.Clear(); DS_temp.Dispose(); }
private void button9_Click(object sender, EventArgs e) { BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select * from Qskyd_mainrecord", "id>=0"); DS_temp.Clear(); DS_temp.Dispose(); }
private void Insert_Qc_Row(string yydh, string qymc, string xfdr, string xfxr, string xfxm, string mxbh, string xftm, string jjdj_qc, string sl_qc, string rx, string czy_temp, string rq) { BLL.Common B_common = new Hotel_app.BLL.Common(); StringBuilder sb = new StringBuilder(); sb.Append(" insert into BB_kc_y_r_cbtj(yydh,qymc,xfdr,xfxr,xfmx,mxbh,xftm,jjdj_qc,sl_qc,jjdj_rk,sl_rk,jjdj_ck,sl_ck,jjdj_tz,sl_tz,jjdj_qm,sl_qm,rx,czy_temp,rq )"); sb.Append(" values('" + yydh + "','" + qymc + "','" + xfdr + "','" + xfxr + "','" + xfxm + "','" + mxbh + "','" + xftm + "','" + jjdj_qc + "','" + sl_qc + "','0','0','" + jjdj_qc + "','0','0','0','0','0','" + rx + "','" + czy_temp + "','" + rq + "')"); B_common.ExecuteSql(sb.ToString()); }
public static void add_lo_ex_re_current(string yydh, string qymc, string syzd, string yhbh, string yhxm, string lo_ex, DateTime login_time, DateTime login_time_yl) { BLL.Common B_Common = new Hotel_app.BLL.Common(); string sql_s = "delete from YH_lo_ex_trace_current where yydh='" + yydh + "' and yhbh='" + yhbh + "' and login_time='" + login_time_yl.ToString() + "'"; B_Common.ExecuteSql(sql_s); sql_s = "insert into YH_lo_ex_trace_current(yydh,qymc,syzd,yhbh,yhxm,lo_ex,login_time) values ('" + yydh + "','" + qymc + "','" + syzd + "','" + yhbh + "','" + yhxm + "','" + lo_ex + "','" + login_time.ToString() + "')"; B_Common.ExecuteSql(sql_s); }
public static void add_wx_yd() { string cssj = DateTime.Now.ToShortDateString(); string jssj = DateTime.Now.ToShortDateString() + " 23:59:59"; string shlf = "0"; string shts = "0"; string shvip = "0"; string fjbm = "0"; BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select * from Fwx_other", " (ddsj between '" + cssj + "' and '" + jssj + "') and fjbh<>''"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (int i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { B_Common.ExecuteSql("update Ffjzt set zyzt='" + DS_temp.Tables[0].Rows[i_0]["zyzt"].ToString() + "',ddsj='" + DS_temp.Tables[0].Rows[i_0]["ddsj"].ToString() + "',lksj='" + DS_temp.Tables[0].Rows[i_0]["lksj"].ToString() + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + DS_temp.Tables[0].Rows[i_0]["fjbh"].ToString() + "' and zyzt <>'" + common_file.common_fjzt.zzf + "' and zyzt<>'" + DS_temp.Tables[0].Rows[i_0]["zyzt"].ToString() + "'"); } } DataSet DS_temp_0 = B_Common.GetList("select * from Qskyd_fjrb", " (ddsj between '" + cssj + "' and '" + jssj + "') and fjbh<>'' and yddj='" + common_file.common_yddj.yddj_yd + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { for (int i_0 = 0; i_0 < DS_temp_0.Tables[0].Rows.Count; i_0++) { shvip = "0"; shlf = "0"; shvip = "0"; if (B_Common.ExecuteSql("update Ffjzt set zyzt_second='" + common_file.common_fjzt.ydf + "',yd_ddsj='" + DS_temp_0.Tables[0].Rows[i_0]["ddsj"].ToString() + "',yd_lksj='" + DS_temp_0.Tables[0].Rows[i_0]["lksj"].ToString() + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + DS_temp_0.Tables[0].Rows[i_0]["fjbh"].ToString() + "' and zyzt='" + common_file.common_fjzt.zzf + "' and (zyzt_second<>'" + common_file.common_fjzt.ydf + "' and yd_ddsj<>'" + DS_temp_0.Tables[0].Rows[i_0]["ddsj"].ToString() + "' and yd_lksj<>'" + DS_temp_0.Tables[0].Rows[i_0]["lksj"].ToString() + "' ) and fjbh in (select fjbh from Qskyd_fjrb where id='" + DS_temp_0.Tables[0].Rows[i_0]["id"].ToString() + "' and yddj='" + common_file.common_yddj.yddj_yd + "')") < 1) { DS_temp = B_Common.GetList("select id from Ffjzt", "fjbh='" + DS_temp_0.Tables[0].Rows[i_0]["fjbh"].ToString() + "' and zyzt<>'" + common_file.common_fjzt.zzf + "' and zyzt_second<>'" + common_file.common_fjzt.ydf + "' "); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { if (common_file.common_fjzt.IsVIP(DS_temp_0.Tables[0].Rows[i_0]["lsbh"].ToString()) == true) { shvip = "1"; } if (common_file.common_fjzt.Islf(DS_temp_0.Tables[0].Rows[i_0]["lsbh"].ToString()) == true) { shlf = "1"; } if (common_file.common_fjzt.Ists(DS_temp_0.Tables[0].Rows[i_0]["lsbh"].ToString()) == true) { shts = "1"; } if (common_file.common_fjzt.Isbm(DS_temp_0.Tables[0].Rows[i_0]["lsbh"].ToString()) == true) { fjbm = "1"; } B_Common.ExecuteSql("update Ffjzt set zyzt_second='" + common_file.common_fjzt.ydf + "',yd_ddsj='" + DS_temp_0.Tables[0].Rows[i_0]["ddsj"].ToString() + "',yd_lksj='" + DS_temp_0.Tables[0].Rows[i_0]["lksj"].ToString() + "',krxm='" + DS_temp_0.Tables[0].Rows[i_0]["krxm"].ToString() + "',lsbh='" + DS_temp_0.Tables[0].Rows[i_0]["lsbh"].ToString() + "',sktt='" + DS_temp_0.Tables[0].Rows[i_0]["sktt"].ToString() + "',shts='" + shts + "',shvip='" + shvip + "',shlf='" + shlf + "',fjbm='" + fjbm + "',czsj='" + DateTime.Now.ToString() + "' where id='" + DS_temp.Tables[0].Rows[0]["id"].ToString() + "' and (zyzt_second<>'" + common_file.common_fjzt.ydf + "' and yd_ddsj<>'" + DS_temp_0.Tables[0].Rows[i_0]["ddsj"].ToString() + "' and yd_lksj<>'" + DS_temp_0.Tables[0].Rows[i_0]["lksj"].ToString() + "' ) and fjbh in (select fjbh from Qskyd_fjrb where id='" + DS_temp_0.Tables[0].Rows[i_0]["id"].ToString() + "' and yddj='" + common_file.common_yddj.yddj_yd + "')"); } } } } DS_temp.Clear(); DS_temp.Dispose(); DS_temp_0.Clear(); DS_temp_0.Dispose(); }
public static bool get_user_qx(string yh_qx, string user_type, bool showMsg) { common_file.common_app.get_czsj(); int i_0 = 1; bool get_result = false; string sql_s = ""; BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet DS_temp = B_Common.GetList("select * from YH_lo_ex_trace_current", " yydh='" + common_app.yydh + "' and yhbh='" + common_app.userNo + "'"); //if (DS_temp != null) // if (DS_temp.Tables[0].Rows.Count > 1) // { // if (common_app.message_box_show_select(common_app.message_title, "出现重复登录的用户,如果不把原来的用户注销掉将不能继续操作,是否确定要注销原来的用户?") == true) // { // sql_s = "delete from YH_lo_ex_trace_current where yydh='" + common_app.yydh + "' and yhbh='" + common_app.userNo + "' and login_time<>'" + common_app.login_time.ToString() + "'"; // B_Common.ExecuteSql(sql_s); // } // else // { // i_0 = 2; // } // } //DS_temp = B_Common.GetList("select * from YH_lo_ex_trace_current", " yydh='" + common_app.yydh + "' and yhbh='" + common_app.userNo + "' and login_time='" + common_app.login_time.ToString() + "'"); //if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) //{ } //else //{ // if (showMsg == true) // { // common_app.Message_box_show(common_app.message_title, "对不起,目前用户已经被最新的同工号的用户重新登录了,已经不能再继续操作了!请重新登录用户!"); // } // i_0 = 2; //} if (i_0 == 1) { DS_temp = B_Common.GetList("select * from YH_RolePermission", " p_lsbh='" + yh_qx + "' and p_value=1 and R_lsbh='" + user_type + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { get_result = true; } else { if (showMsg == true) { common_app.Message_box_show(common_app.message_title, "对不起,您没有此操作权限!"); } } } return(get_result); Cursor.Current = Cursors.Default; }
public bool CheckSelectAll(string jzbh) { bool result = false; if (!jzbh.Equals("")) { DataTable dt_xf = null; DataTable dt_fk = null; DataTable dt_total = null; DataSet ds = null; BLL.Common bll = new Hotel_app.BLL.Common(); ds = bll.GetList("select id_app from Szwmx", " jzbh='" + jzbh + "'"); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { dt_xf = ds.Tables[0]; } ds = bll.GetList("select id_app from Syjcz", " jzbh='" + jzbh + "'"); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { dt_fk = ds.Tables[0]; } if (dt_xf != null) { if (dt_fk != null) { dt_xf.Merge(dt_fk); dt_total = dt_xf; } else { dt_total = dt_xf; } } else { if (dt_fk != null) { dt_total = dt_fk; } } if (dt_total != null && dt_total.Rows.Count > 0) { DataSet ds_ls = bll.GetList(" select id_app from Szw_temp", " jzbh='" + jzbh + "' and czy_temp='" + common_app.czy_GUID + "'"); if (ds_ls != null && ds_ls.Tables.Count > 0 && ds_ls.Tables[0].Rows.Count > 0) { //记录条数相同,那说明肯定是全部选择出来了 if (dt_total.Rows.Count == ds_ls.Tables[0].Rows.Count) { result = true; } } } } return(result); }
/// <summary> /// 用来删除主单或退房时单据的删除和修改房态及备份相应记录 /// </summary> /// <param name="id"></param> /// <param name="czzt"></param>两个值,一个是删除“sc”,一个是结账"jz" /// <param name="czbz"></param>主要是两个值,一个是“取消”,一个“未到”到common_yddj里去找 /// <param name="qxyy"></param>取消原因 /// <param name="jzbh"></param> /// <param name="czy"></param> /// <param name="czsj"></param> /// <param name="xxzs"></param> /// <returns></returns> public string delete_sz_ttyd(string id, string czzt, string czbz, string qxyy, string jzbh, string czy, string czsj, string xxzs) { int i_temp = 8;//用来M_Qskyd_mainrecord =NULL时判断 string s = common_file.common_app.get_failure; BLL.Qttyd_mainrecord B_Qttyd_mainrecord = new Hotel_app.BLL.Qttyd_mainrecord(); Model.Qttyd_mainrecord M_Qttyd_mainrecord = new Hotel_app.Model.Qttyd_mainrecord(); BLL.Qttyd_mainrecord_new B_Qttyd_mainrecord_new = new Hotel_app.BLL.Qttyd_mainrecord_new(); Qyddj.Qyddj_add_edit_delete Qyddj_add_edit_delete_new = new Qyddj_add_edit_delete(); BLL.Common B_Common = new Hotel_app.BLL.Common(); if (id != "") { DataSet DS_temp; M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModel(int.Parse(id)); //判断预订的记录有两条房类时删除同一个主单避免出错 if (M_Qttyd_mainrecord == null) { i_temp = 9; } else { s = common_file.common_app.get_suc; DS_temp = B_Common.GetList("select * from Qskyd_mainrecord", "ddbh='" + M_Qttyd_mainrecord.ddbh + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { s = common_file.common_app.get_failure; for (int i_temp_0 = 0; i_temp_0 < DS_temp.Tables[0].Rows.Count; i_temp_0++) { s = Qyddj_add_edit_delete_new.delete_sz_xgft(DS_temp.Tables[0].Rows[i_temp_0]["id"].ToString(), czzt, czbz, qxyy, jzbh, czy, czsj, xxzs); } } if (s == common_file.common_app.get_suc) { s = common_file.common_app.get_failure; //清除入住记录 int strid = int.Parse(id); //common_file.common_Qskyd_mainrecord.PlInter(int.Parse(id), "删除"); B_Qttyd_mainrecord_new.Pladd(strid, czbz, qxyy, czy, czsj, czzt, jzbh);//删除前批量添加到备份表里 if (B_Qttyd_mainrecord.Delete(strid) == true) { //s = common_file.common_app.get_suc; } } } if (i_temp == 9) { //s = common_file.common_app.get_suc; } } s = common_file.common_app.get_suc; return(s); }