Пример #1
0
        private string GetStageTemplateList1(HttpContext context)
        {
            string where = " where 1=1 " +
                           (context.Request["sid"] == "-1" ? "" : " and stage.p_sid=" + context.Request["sid"]);
            string key = context.Request["key"];

            if (!string.IsNullOrWhiteSpace(key))
            {
                key    = key.Replace("'", "''");
                key    = key == "可用" ? "1" : key == "不可用" ? "0" : key;
                where += " and( " +
                         " stage_name like '%" + key + "%' " +
                         " or text like '%" + key + "%' " +
                         " or status like '%" + key + "%' " +
                         " or remark like '%" + key + "%' " +
                         " or dbo.getUserName_fu(create_person) like '%" + key + "%' " +
                         " or create_date like '%" + key + "%' " +
                         " or dbo.getUserName_fu(update_person) like '%" + key + "%' " +
                         " or update_date like '%" + key + "%' " +
                         " ) ";
            }
            DataTable dt = new DataTable();
            DataSet   ds = new BLL.Common().GetList("select dbo.getPTTame(stage.p_sid)ptt_name, stage.sid,stage_name,status,remark,number,is_system,[text] stageType,row_number()over (order by sequence) as rowid,create_date,create_person,update_date,update_person,dbo.getUserName_fu(create_person) as createP,dbo.getUserName_fu(update_person) as updateP from stage left outer join project_stage_type on stage.is_system=[value] " + where + " order by sequence asc");

            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }
Пример #2
0
        //当日 sktt 分析//在住
        public void dr_yd_yl_zz_update_repeat(string yydh, string qymc, BLL.Common B_Common, string zyzt, string table_name, DataSet DS_fs, DataSet DS_rs, string fs, string rs)
        {
            int    j_0      = 0;
            string update_s = "";

            if (DS_fs != null && DS_fs.Tables[0].Rows.Count > 0)
            {
                for (j_0 = 0; j_0 < DS_fs.Tables[0].Rows.Count; j_0++)
                {
                    if (DS_fs.Tables[0].Rows[j_0]["fs"].ToString() != "")
                    {
                        if (DS_fs.Tables[0].Rows[j_0]["sktt"].ToString() == zyzt)
                        {
                            update_s = "update " + table_name + " set " + fs + "='" + DS_fs.Tables[0].Rows[j_0]["fs"].ToString() + "' where zyzt='" + zyzt + "'";
                            B_Common.ExecuteSql(update_s);
                        }
                    }
                }
            }
            if (DS_rs != null && DS_rs.Tables[0].Rows.Count > 0)
            {
                for (j_0 = 0; j_0 < DS_rs.Tables[0].Rows.Count; j_0++)
                {
                    if (DS_rs.Tables[0].Rows[j_0]["sktt"].ToString() == zyzt)
                    {
                        update_s = "update " + table_name + " set " + rs + "='" + DS_rs.Tables[0].Rows[j_0]["rs"].ToString() + "' where zyzt='" + zyzt + "'";
                        B_Common.ExecuteSql(update_s);
                    }
                }
            }
        }
Пример #3
0
        public string ProcessCategoryList(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList("select pcm.sid,pcm.category,pcm.v1,bdd.Caption,bdd.Value from project_processing_category_model pcm  INNER JOIN  BaseDictionaryDetail bdd on pcm.v1=bdd.Value where status=1      and type=1 and CatgID=13").Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }
Пример #4
0
        //第一种生成订单编号的方法
        public static string ddbh(string bs, string rq, string counter, int lsmcd)
        {
            int    a; int c; int id;
            string b = ""; string d = "";
            string ddbhyy    = "";
            string counteryy = "";
            string rqyy      = "";
            string qybh      = common_file.common_app.qybh;

            BLL.Common B_Common = new BLL.Common();
            DataSet    DS_temp  = B_Common.GetList("select * from Qcounter", "id>=0" + common_file.common_app.yydh_select);

            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                counteryy = DS_temp.Tables[0].Rows[0][counter].ToString();
                rqyy      = DS_temp.Tables[0].Rows[0][rq].ToString();
            }

            if (counteryy == "")
            {
                B_Common.ExecuteSql("update Qcounter set " + rq + "='" + DateTime.Today.ToString() + "'," + counter + "=0 where id>=0" + common_file.common_app.yydh_select);
            }
            else
            {
                if (Convert.ToDateTime(rqyy) == DateTime.Today)
                {
                    c = Convert.ToInt32(counteryy);
                    c = c + 1;
                    B_Common.ExecuteSql("update Qcounter set " + counter + "=" + c.ToString() + " where id>=0" + common_file.common_app.yydh_select);
                }
                else
                {
                    B_Common.ExecuteSql("update Qcounter set " + rq + "='" + DateTime.Today.ToString() + "'," + counter + "=0 where id>=0" + common_file.common_app.yydh_select);
                }

                DS_temp = B_Common.GetList("select * from Qcounter", "id>=0" + common_file.common_app.yydh_select);
                if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                {
                    counteryy = DS_temp.Tables[0].Rows[0][counter].ToString();
                    rqyy      = DS_temp.Tables[0].Rows[0][rq].ToString();
                }
                a = counteryy.ToString().Length;
                b = lsm(a, lsmcd);
                d = DateTime.Today.Year.ToString();
                if (DateTime.Today.Month.ToString().Length == 1)
                {
                    d = d + "0";
                }
                d = d + DateTime.Today.Month.ToString();
                if (DateTime.Today.Day.ToString().Length == 1)
                {
                    d = d + "0";
                }
                d      = d + DateTime.Today.Day.ToString();
                ddbhyy = qybh + bs + d + b + counteryy.ToString();
            }

            DS_temp.Dispose();
            return(ddbhyy);
        }
Пример #5
0
        private string SAllCheck(HttpContext context)
        {
            string    result = "{\"total\":0,\"rows\":[]}";
            DataTable dt     = new DataTable();

            string where = "1=1";
            if (context.Request["userName"] != "" || !string.IsNullOrEmpty(context.Request["userName"]))
            {
                where += " and Name like '%" + context.Request["userName"] + "%'";
            }

            if (context.Request["workID"] != "" || !string.IsNullOrEmpty(context.Request["workID"]))
            {
                where += " and WorkID like '%" + context.Request["workID"] + "%'";
            }
            if (!string.IsNullOrEmpty(context.Request["startTime"]) & !string.IsNullOrEmpty(context.Request["endTime"]))
            {
                where += " and KaoQinRiQi between '" + context.Request["startTime"].ToString().Trim() + " 00:00:00'" + " and '" + context.Request["endTime"].Trim() + " 23:59:59'";
            }
            int    total = 0;
            int    page  = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            int    rows  = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            string key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
            string sort  = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "b.UserID";

            string table = "ERPKaoQin as a inner join BaseUser as b on a.UserID=b.UserID";
            string show  = "convert(nvarchar(14),a.KaoQinRiQi,23) as T,(isnull((convert(nvarchar(40),DengJiTime1,20)),'')+case when GuiDingTime1<DengJiTime1 then ' (迟到)' when DengJiTime1 is NULL then '未登记' else ' (正常)' end) as DengJiTime1,(isnull((convert(nvarchar(40),DengJiTime2,20)),'')+case when GuiDingTime2>DengJiTime2 then ' (早退)' when DengJiTime2 is NULL then '未登记'  else ' (正常)' end) as DengJiTime2,(isnull((convert(nvarchar(40),DengJiTime3,20)),'')+case when GuiDingTime3<DengJiTime3 then ' (迟到)' when DengJiTime3 is NULL then '未登记'  else ' (正常)' end) as DengJiTime3,(isnull((convert(nvarchar(40),DengJiTime4,20)),'')+case when GuiDingTime4>DengJiTime4 then ' (早退)' when DengJiTime4 is NULL then '未登记' else ' (正常)' end) as DengJiTime4,b.* ";

            dt     = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
            result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total);
            return(result);
        }
Пример #6
0
        private string FlowModelList(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList(" select distinct id ,work_flow_name as [text] from work_flow_model").Tables[0];
            return(DBUtility.JsonHelper.DataTable2List(dt));
        }
Пример #7
0
        public static decimal Get_lksl(string xrbh, string lksl, string lsbh)
        {
            BLL.Common B_Common = new BLL.Common();
            decimal    xfsl     = 0;
            decimal    xfsl_01  = 0;
            decimal    sumxfsl  = 0;
            DataSet    ds       = B_Common.GetList("select * from Xxfmx_lkmx", "mxbh='" + xrbh + "' and lsbh='" + lsbh + "'");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                xfsl = Convert.ToDecimal(ds.Tables[0].Rows[0]["xfsl"].ToString());
                if (lksl != null && lksl != "")
                {
                    xfsl_01 = Convert.ToDecimal(lksl);
                    sumxfsl = xfsl + xfsl_01;
                    // Update_xfmx_kcsl(xrbh, xfsl_01);//更新xfmx里的kcsl
                }
            }
            else
            {
                sumxfsl = Convert.ToDecimal(lksl);
                //Update_xfmx_kcsl(xrbh, sumxfsl);//更新xfmx里的kcsl
            }
            return(sumxfsl);
        }
Пример #8
0
        public HttpResponseMessage queryMusic()
        {
            DataTable dt = new BLL.Common().queryMusic();
            Object    data;

            if (dt.Rows.Count == 1)
            {
                data = new
                {
                    success = true,
                    music   = generateMusic(dt.Rows[0])
                };
            }
            else
            {
                data = new
                {
                    success = false,
                    backMsg = "数据异常"
                };
            }

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            string json = serializer.Serialize(data);

            return(new HttpResponseMessage
            {
                Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
            });
        }
Пример #9
0
        public HttpResponseMessage getWebTotal()
        {
            DataTable dt = new BLL.Common().getWebTotal();
            Object    data;

            if (dt.Rows.Count > 0)
            {
                data = new
                {
                    success  = true,
                    backData = new {
                        cultureTotal = dt.Rows[0][0],
                        artTotal     = dt.Rows[1][0],
                        tasteTotal   = dt.Rows[2][0],
                        videoTotal   = dt.Rows[3][0]
                    }
                };
            }
            else
            {
                data = new
                {
                    success = false,
                    backMsg = "数据异常"
                };
            }

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            string json = serializer.Serialize(data);

            return(new HttpResponseMessage
            {
                Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
            });
        }
Пример #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (PageID == null)
         {
             string url = HttpContext.Current.Request.Url.AbsolutePath.Trim();
             if (url.IndexOf('/') == 0)
             {
                 url = url.Substring(1);
             }
             DataTable dt = new DataTable();
             try
             {
                 dt     = new BLL.Common().GetList("select PageID from BaseMenu where LinkUrl like '%" + url + "%'").Tables[0];
                 PageID = dt.Rows[0]["PageID"].ToString().Trim();
             }
             catch
             {
             }
         }
         WCDataProvider        db  = new WCDataProvider();
         WCDataStoreProcedures dsp = new WCDataStoreProcedures("sp_permission", WCDataAction.Query4);
         dsp.InputPars.Add("@PageID", PageID);
         dsp.InputPars.Add("@RolseIDs", (Session["login"] as Model.BaseUser).Roles);
         if (db.Execute(dsp).ExecuteState)
         {
             jsValue = dsp.OutputPars["@strOut"].ToString();
         }
         jsValue = string.IsNullOrWhiteSpace(jsValue) ? IDS : jsValue;
     }
 }
Пример #11
0
        public void insert_cy(BLL.Common B_Common, string yydh, string qymc, string czy, string krxm, string lsbh, string fjbh, string sjfjjg, string shqh, string xydw, string krly, string sktt, string shtt, string ddsj, string lksj, string lz, string lzbh, string fjdh, string dhfj, string fkje, string xfje, string yj_xfje, string ye)
        {
            string insert_s = "insert into BB_ysk_cy (yydh, qymc,czy, krxm, lsbh, fjbh, sjfjjg, shqh, xydw, krly, sktt, shtt, ddsj, lksj, lz, lzbh, fjdh, dhfj, fkje, xfje, yj_xfje,ye)";

            insert_s = insert_s + " values ('" + yydh + "', '" + qymc + "','" + czy + "', '" + krxm + "', '" + lsbh + "', '" + fjbh + "', '" + sjfjjg + "', '" + shqh + "', '" + xydw + "', '" + krly + "', '" + sktt + "', '" + shtt + "', '" + ddsj + "', '" + lksj + "', '" + lz + "', '" + lzbh + "', '" + fjdh + "', '" + dhfj + "', '" + fkje + "', '" + xfje + "', '" + yj_xfje + "', '" + ye + "')";
            B_Common.ExecuteSql(insert_s);
        }
Пример #12
0
        //抵离的分析-预计到店
        public void dr_fx_dd_lk_yjdd(BLL.Common B_Common, DataSet DS_temp, ref float yjdd_fs, ref float yjdd_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select sum(lzfs) as lzfs from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                if (DS_temp.Tables[0].Rows[0]["lzfs"].ToString() != "")
                {
                    string temp_0 = DS_temp.Tables[0].Rows[0]["lzfs"].ToString();
                    yjdd_fs = float.Parse(temp_0);
                }
            }

            DS_temp = B_Common.GetList("select fjrb,sum(lzfs) as lzfs  from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "' group by fjrb");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                if (DS_temp.Tables[0].Rows[0]["lzfs"].ToString() != "")
                {
                    float yjdd_rs_0 = 0;
                    for (int i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++)
                    {
                        yjdd_rs_0 = float.Parse(DS_temp.Tables[0].Rows[i_0]["lzfs"].ToString());
                        DataSet DS_temp_0 = B_Common.GetList("select zyrs from Ffjrb", "fjrb='" + DS_temp.Tables[0].Rows[i_0]["fjrb"].ToString() + "'");
                        if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0)
                        {
                            yjdd_rs_0 = float.Parse(DS_temp.Tables[0].Rows[i_0]["lzfs"].ToString()) * float.Parse(DS_temp_0.Tables[0].Rows[0]["zyrs"].ToString());
                        }
                        yjdd_rs = yjdd_rs + yjdd_rs_0;
                        DS_temp_0.Clear();
                        DS_temp_0.Dispose();
                    }
                }
            }
        }
Пример #13
0
        public void dr_fx_dd_lk_add(string yydh, string qymc, BLL.Common B_Common, string zyzt, float zyfs, float zyrs, string table_name, string czy)
        {
            common_file.common_app.get_czsj();
            string insert_s = "insert into " + table_name + "(yydh,qymc,zyzt,zyfs,zyrs,czy) values ('" + yydh + "','" + qymc + "','" + zyzt + "','" + zyfs + "','" + zyrs + "','" + czy + "')";

            B_Common.ExecuteSql(insert_s);
        }
Пример #14
0
        private string AllTemplateType(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList("select * from project_template_type ").Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }
Пример #15
0
        private string ProductColor(HttpContext context)
        {
            string id     = context.Request["id"] != null ? context.Request["id"].Trim() : "0";
            string childs = context.Request["child"] != null ? context.Request["child"].Trim() : "0";

            if (childs.Trim() == "")
            {
                childs = "0";
            }
            int total = 0;
            int page  = context.Request.Form["page"] != null?Convert.ToInt32(context.Request.Form["page"]) : 0;

            int rows = context.Request.Form["rows"] != null?Convert.ToInt32(context.Request.Form["rows"]) : 0;

            string key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string order = context.Request.Form["order"] != null ? context.Request.Form["order"] : "desc";
            string sort  = context.Request.Form["sort"] != null ? context.Request.Form["sort"] : "id";

            string where = " 1=1 and id not in (select * from dbo.getTable(isnull(dbo.getParentNode(" + id + ")," + id + "),',')) and id not in(" + childs + ")";
            string    table = "v_ProductColorShip";
            string    show  = "(Code+ColorCode)PCCode,*";
            DataTable dt    = new DataTable();
            DataSet   ds    = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where);

            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total));
        }
Пример #16
0
        /// <summary>
        /// 提取所有ADImg的详情
        /// </summary>
        /// <param name="context">参数</param>
        /// <returns>datagrid json格式</returns>
        private string GetAllAD(HttpContext context)
        {
            DataTable dt    = new DataTable();
            int       total = 0;
            int       page  = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            int       rows  = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            string    key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string    order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
            string    sort  = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "CreateTime";

            string where = "1=1";
            string table = "ad_img";
            string show  = "*,dbo.getName_zxf(CreateUserID) as CreateUser,dbo.getName_zxf(UpdateUserID) as UpdateUser,(case when show=1 then '是' else '否' end) as showname ";

            dt = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
            if (dt.Rows.Count > 0)
            {
                return(DataTable2Json_Datagrid(dt, total));
            }

            else
            {
                return("{\"total\":0,\"rows\":[]}");
            }
        }
Пример #17
0
        private string ImpList(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList("select sid,implement_name,s_sid,remark,sequence from project_stage_implement_model where s_sid='" + context.Request.Params["ssid"].Trim() + "' order by sequence asc").Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }
Пример #18
0
        public void Insert_SQL_bbfx(BLL.Common B_Common, string table_name, string yydh, string qymc, string sbzd, string xfrb, string sjxfje, string czy, string y_r, string y_z_w, DateTime bbrq)
        {
            string sql_s = "insert into " + table_name + " (yydh,qymc,sbzd,xfrb,sjxfje,czy_temp,y_r,y_z_w,bbrq)";

            sql_s = sql_s + " values ('" + yydh + "','" + qymc + "','" + sbzd + "','" + xfrb + "','" + sjxfje.ToString() + "','" + czy + "','" + y_r + "','" + y_z_w + "','" + bbrq.ToShortDateString() + "')";
            B_Common.ExecuteSql(sql_s);
        }
Пример #19
0
        public void saveToGdTemp()
        {
            string zd_krxm = tB_krxm.Text.Replace("'", "-").Trim();
            string zd_fjbh = tb_fjbh.Text.Replace("'", "-").Trim();
            string zd_ddsj = DateTime.Parse(dT_ddsj_date.Text + " " + dT_ddsj_time.Text).ToString();
            string zd_lksj = DateTime.Parse(dT_lksj_date.Text + " " + dT_lksj_time.Text).ToString();
            string zd_jzsj = DateTime.Parse(dT_jzsj_date.Text + " " + dT_jzsj_Time.Text).ToString();

            sb = new StringBuilder();
            if (gd_Type == "jz")
            {
                sb.Append(" update Sjzmx_gd_temp set zd_krxm_lz='" + zd_krxm + "',zd_fjbh='" + zd_fjbh + "', zd_fjbh_lz='" + zd_fjbh + "',zd_ddsj='" + zd_ddsj + "',zd_tfsj='" + zd_lksj + "'  where jzbh='" + zd_jzbh + "' and czy_temp='" + common_file.common_app.czy_GUID + "'");
            }
            if (gd_Type == "zz")
            {
                sb.Append(" update Sjzmx_gd_temp set zd_krxm_lz='" + zd_krxm + "',zd_fjbh='" + zd_fjbh + "', zd_fjbh_lz='" + zd_fjbh + "',zd_ddsj='" + zd_ddsj + "',zd_tfsj='" + zd_lksj + "'  where   czy_temp='" + common_file.common_app.czy_GUID + "'");
            }
            B_common = new Hotel_app.BLL.Common();
            if (B_common.ExecuteSql(sb.ToString()) > 0)
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "主单修改成功");
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
        private string ProcessCategoryList(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList("select * from project_processing_category_model where status=1 ").Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count));
        }
Пример #21
0
        public void insert_s(BLL.Common B_Common, string yydh, string qymc, string type, string fxdr, string fxrb, float zyye, float zfh, float czfs, string pjczl, string xd_pjczl, float pjfj, float jcb, string pjbl, string xd_pjbl, string czy, string cssj, string jssj)
        {
            string sql_s = "insert into BQ_syxffx(yydh,qymc,type,fxdr,fxrb,zyye,zfh,czfs,pjczl,xd_pjczl,pjfj,jcb,pjbl, xd_pjbl,czy_temp,cssj,jssj)";

            sql_s = sql_s + " values ('" + yydh + "','" + qymc + "','" + type + "','" + fxdr + "','" + fxrb + "','" + zyye + "','" + zfh + "','" + czfs + "','" + pjczl + "','" + xd_pjczl + "','" + pjfj + "','" + jcb + "','" + pjbl + "','" + xd_pjbl + "','" + czy + "','" + cssj + "','" + jssj + "')";
            B_Common.ExecuteSql(sql_s);
        }
Пример #22
0
        private void loadInfo()
        {
            if (id_app.Trim() != "")
            {
                B_common = new Hotel_app.BLL.Common();
                ds_0     = B_common.GetList(" select  *  from sjzmx_gd_temp ", "id>=0 and yydh='" + common_file.common_app.yydh + "' and  id_app='" + id_app + "'");
                if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0)
                {
                    tB_xfxm.Text     = ds_0.Tables[0].Rows[0]["xfxm"].ToString();
                    tB_xfxm_new.Text = ds_0.Tables[0].Rows[0]["xfxm"].ToString();

                    tB_xfje.Text     = ds_0.Tables[0].Rows[0]["sjxfje"].ToString();
                    tB_xfje_new.Text = ds_0.Tables[0].Rows[0]["sjxfje"].ToString();

                    tB_xfzy.Text     = ds_0.Tables[0].Rows[0]["xfzy"].ToString();
                    tB_xfzy_new.Text = ds_0.Tables[0].Rows[0]["xfzy"].ToString();

                    tB_xfbz.Text     = ds_0.Tables[0].Rows[0]["xfbz"].ToString();
                    tB_xfbz_new.Text = ds_0.Tables[0].Rows[0]["xfbz"].ToString();

                    tB_xfsj.Text      = ds_0.Tables[0].Rows[0]["xfsj"].ToString();
                    dT_xfsj_Date.Text = DateTime.Parse(tB_xfsj.Text).ToShortDateString();
                    dT_xfsj_Time.Text = DateTime.Parse(tB_xfsj.Text).ToShortTimeString();
                }
                else
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "加载旧消费项目出错.");
                }
            }
        }
Пример #23
0
        private string GetAllCheck(HttpContext context)
        {
            string result = "{\"total\":0,\"rows\":[]}";
            //Model.BaseUser buModel = (Model.BaseUser)context.Session["login"];
            //WCDataProvider db = new WCDataProvider();
            //WCDataStoreProcedures dsp = new WCDataStoreProcedures("sp_kaoqin", WCDataAction.Query2);
            ////dsp.InputPars.Add("@UserID", buModel.UserID);
            //if (db.Execute(dsp).ExecuteState)
            //{
            //    DataTable dt = dsp.OutputDataSet.Tables[0];
            //    if (dt.Rows.Count > 0)
            //    {
            //        result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count);
            //    }
            //    //else
            //    //{
            //    //    result = "{[]}";
            //    //}
            //}
            DataTable dt    = new DataTable();
            int       total = 0;
            int       page  = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            int       rows  = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            string    key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string    order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
            string    sort  = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "b.UserID";

            string where = " 1=1 ";
            string table = "ERPKaoQin as a inner join BaseUser as b on a.UserID=b.UserID";
            string show  = "convert(nvarchar(14),a.KaoQinRiQi,23) as T,(isnull((convert(nvarchar(40),DengJiTime1,20)),'')+case when GuiDingTime1<DengJiTime1 then ' (迟到)' when DengJiTime1 is NULL then '未登记' else ' (正常)' end) as DengJiTime1,(isnull((convert(nvarchar(40),DengJiTime2,20)),'')+case when GuiDingTime2>DengJiTime2 then ' (早退)' when DengJiTime2 is NULL then '未登记'  else ' (正常)' end) as DengJiTime2,(isnull((convert(nvarchar(40),DengJiTime3,20)),'')+case when GuiDingTime3<DengJiTime3 then ' (迟到)' when DengJiTime3 is NULL then '未登记'  else ' (正常)' end) as DengJiTime3,(isnull((convert(nvarchar(40),DengJiTime4,20)),'')+case when GuiDingTime4>DengJiTime4 then ' (早退)' when DengJiTime4 is NULL then '未登记' else ' (正常)' end) as DengJiTime4,b.* ";

            dt     = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
            result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total);
            return(result);
        }
Пример #24
0
        public void update_jzzt_czzt(BLL.Common B_Common, string yydh, string qymc)
        {
            DataSet DS_temp = B_Common.GetList("select * from VIEW_S_jzzt_czzt_jzmx", "1=1");

            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < DS_temp.Tables[0].Rows.Count; i++)
                {
                    string jzbh_zd = DS_temp.Tables[0].Rows[i]["jzbh"].ToString();
                    string jzzt_zd = DS_temp.Tables[0].Rows[i]["jzzt"].ToString();
                    string czzt_zd = DS_temp.Tables[0].Rows[i]["czzt"].ToString();
                    string czsj_zd = DS_temp.Tables[0].Rows[i]["czsj"].ToString();
                    B_Common.ExecuteSql(" update Sjzmx set jzzt='" + jzzt_zd + "',czzt='" + czzt_zd + "',czsj='" + czsj_zd + "' where jzbh='" + jzbh_zd + "' and yydh='" + yydh + "'");
                }
            }
            DS_temp = B_Common.GetList("select * from VIEW_S_czzt_zwmx", "1=1");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < DS_temp.Tables[0].Rows.Count; i++)
                {
                    string jzbh_zd = DS_temp.Tables[0].Rows[i]["jzbh"].ToString();
                    string czzt_zd = DS_temp.Tables[0].Rows[i]["czzt"].ToString();
                    B_Common.ExecuteSql(" update Szwmx set czzt='" + czzt_zd + "' where jzbh='" + jzbh_zd + "' and yydh='" + yydh + "'");
                }
            }
            B_Common.ExecuteSql("delete from Sjzmx where jzbh not in(select jzbh from Sjzzd)");
            DS_temp.Clear();
            DS_temp.Dispose();
        }
Пример #25
0
        private string SMyCheck(HttpContext context)
        {
            string result = "{\"total\":0,\"rows\":[]}";

            if (context.Session["login"] == null)
            {
                System.Web.HttpContext.Current.Response.Write("<script>alert('登录信息安全时限过期,请重新登录!');top.location='../Login.aspx'</script>");
            }
            else
            {
                DataTable      dt      = new DataTable();
                Model.BaseUser buModel = (Model.BaseUser)context.Session["login"];
                int            total   = 0;
                int            page    = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
                int            rows    = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
                string         key     = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
                string         order   = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
                string         sort    = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "b.UserID";
                string where = " 1=1 and a.UserID=" + buModel.UserID + " and KaoQinRiQi between '" + context.Request["startTime"].ToString().Trim() + " 00:00:00'" + " and '" + context.Request["endTime"].Trim() + " 23:59:59'";;
                string table = "ERPKaoQin as a inner join BaseUser as b on a.UserID=b.UserID";
                string show  = "convert(nvarchar(14),a.KaoQinRiQi,23) as T,(isnull((convert(nvarchar(40),DengJiTime1,20)),'')+case when GuiDingTime1<DengJiTime1 then ' (迟到)' when DengJiTime1 is NULL then '未登记' else ' (正常)' end) as DengJiTime1,(isnull((convert(nvarchar(40),DengJiTime2,20)),'')+case when GuiDingTime2>DengJiTime2 then ' (早退)' when DengJiTime2 is NULL then '未登记'  else ' (正常)' end) as DengJiTime2,(isnull((convert(nvarchar(40),DengJiTime3,20)),'')+case when GuiDingTime3<DengJiTime3 then ' (迟到)' when DengJiTime3 is NULL then '未登记'  else ' (正常)' end) as DengJiTime3,(isnull((convert(nvarchar(40),DengJiTime4,20)),'')+case when GuiDingTime4>DengJiTime4 then ' (早退)' when DengJiTime4 is NULL then '未登记' else ' (正常)' end) as DengJiTime4,b.* ";

                dt     = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
                result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total);
            }

            return(result);
        }
Пример #26
0
        public string SelectAllImpt(HttpContext context)
        {
            string    result;
            DataTable dt = new DataTable();

            string where = "1=1";
            dt           = new BLL.Common().GetList("select sid,implement_name,remark,create_person,create_date,update_person,update_date from implement").Tables[0];
            //int total = 0;
            //int page = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            //int rows = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            //string key = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            //string order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
            //string sort = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "implement_name";
            //string table = "implement";
            //string show = "sid,implement_name,remark";
            //dt = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
            if (dt.Rows.Count > 0)
            {
                result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count);
            }
            else
            {
                result = "{\"total\":0,\"rows\":[]}";
            }

            return(result);
        }
Пример #27
0
        public string ProcessCategoryCombo(HttpContext context)
        {
            DataTable dt = new DataTable();

            dt = new BLL.Common().GetList("select * from project_processing_category_model where status=1  and type=1").Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Combo(dt));
        }
Пример #28
0
        private string ProjectProductBatch(HttpContext context)
        {
            string productID = context.Request["productID"] != null ? context.Request["productID"].Trim() : "0";

            productID = !string.IsNullOrEmpty(productID) ? context.Request["productID"].Trim() : "0";
            int total = 0;
            int page  = context.Request.Form["page"] != null?Convert.ToInt32(context.Request.Form["page"]) : 0;

            int rows = context.Request.Form["rows"] != null?Convert.ToInt32(context.Request.Form["rows"]) : 0;

            string key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string order = context.Request.Form["order"] != null ? context.Request.Form["order"] : "desc";
            string sort  = context.Request.Form["sort"] != null ? context.Request.Form["sort"] : "id";

            string where = " 1=1 and id not in (" + productID + ") ";
            string    table = "v_ProductColorShip";
            string    show  = "(Code+ColorCode)PCCode,*";
            DataTable dt    = new DataTable();
            DataSet   ds    = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where);

            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total));
        }
Пример #29
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="yydh"></param>
        /// <param name="qymc"></param>
        /// <param name="cssj"></param>
        /// <param name="jssj"></param>
        /// <param name="sel_cond"></param>
        /// <param name="type"></param>挂账gz或记账jz
        /// <param name="czy"></param>
        /// <param name="czsj"></param>
        /// <param name="xxzs"></param>
        /// <returns></returns>
        ///

        public void insert_s(BLL.Common B_Common, string yydh, string qymc, string jzzt, string type, float zfh, float ds, float qt, float zyye, float zzzz, float zgz_zjz, float zsz, float wj, string czy_temp, string cssj, string jssj)
        {
            string sql_s = "insert into BS_g_j_fx( yydh, qymc, jzzt, type, zfh, ds, qt, zyye, zzz, zgz_zjz, zsz, wj, czy_temp, cssj, jssj)";

            sql_s = sql_s + " values ('" + yydh + "', '" + qymc + "', '" + jzzt + "', '" + type + "', '" + zfh + "', '" + ds + "', '" + qt + "', '" + zyye + "', '" + zzzz + "', '" + zgz_zjz + "', '" + zsz + "', '" + wj + "', '" + czy_temp + "', '" + cssj + "', '" + jssj + "')";
            B_Common.ExecuteSql(sql_s);
        }
Пример #30
0
        public string QueryList(HttpContext context)
        {
            DataTable dt    = new DataTable();
            int       total = 0;
            int       page  = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            int       rows  = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            string    key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            string    order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
            string    sort  = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "type_name";

            string where = " 1=1 ";
            if (key != "" && !string.IsNullOrEmpty(key))
            {
                string status = "";
                if (key == "生效")
                {
                    status = "1";
                }
                else
                {
                    status = "0";
                }
                where += " and (flow_name like '%" + key + "%' or form like '%" + key + "%' or dept like '%" + key + "%' or flow_status like '%" + status + "%' )";
            }
            string table = "flow_master a left outer join request_form b on a.rf_sid=b.sid left outer join request_form_type c on b.rft_sid=c.sid";
            string show  = "a.sid,a.flow_name,a.rf_sid,a.dept_sid,a.post_sid,a.flow_status,a.remark,a.form as form_name,a.dept as DeptName, a.post as RoleName,c.type_name";

            dt = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total));
        }