C#改变查询出来的值

List<YXToolSystem.SQLStruct> col = new List<YXToolSystem.SQLStruct>();
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_NO", "编号"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_TypeNO", "问题类型编号"));
            col.Add(new YXToolSystem.SQLStruct(colsl("ServicesList_NO"), "排班编号"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_CNO", "客户编号"));
            col.Add(new YXToolSystem.SQLStruct(colsl("ServicesList_EPTNO"), "排班类型编号"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_ServicesNO", "服务费编号"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_CName", "客户名称"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_TypeName", "问题类型"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_Question", "问题"));
            col.Add(new YXToolSystem.SQLStruct("ServicesQuestion_Time", "售后次数"));

col.Add(new YXToolSystem.SQLStruct(colsl("ServicesList_EName"), "技术员名称"));
            ClassServicesSpeed cs = new ClassServicesSpeed();
            col.Add(new YXToolSystem.SQLStruct(cs.GetSeeSQL("isnull(" + colsl("ServicesList_Speed") + ",-1)"), "状态"));
            col.Add(new YXToolSystem.SQLStruct("SUBSTRING(CONVERT(varchar(16)," + colsl("ServicesList_ExpectStart") + ", 25),6,11)", "预计开始时间"));
            col.Add(new YXToolSystem.SQLStruct("SUBSTRING(CONVERT(varchar(16)," + colsl("ServicesList_ExpectEnd") + ", 25),6,11)", "预计完成时间"));
            col.Add(new YXToolSystem.SQLStruct(colsl("ServicesList_ExpectEnd"), "endTime"));

col.Add(new YXToolSystem.SQLStruct("(case isnull(" + colsl("ServicesList_IsFinish") + ",0) when 1 then ‘是‘ else ‘否‘ end )", "此单结束"));

col.Add(new YXToolSystem.SQLStruct(cs.GetSeeSQL_ifserver("isnull(" + colsl("ServicesList_IsReturn") + ",0)"), "是否解决(技术员)"));

col.Add(new YXToolSystem.SQLStruct("isnull(" + colsl("ServicesList_Speed") + ",-1)", "售后步骤"));

string sql = YXToolSystem.SQLGet.Select(col, "ServicesQuestion") + " where ServicesQuestion_IsOK=‘0‘";
            switch (butIndex)
            {
                case 0:
                    sql += " order by 编号 asc";
                    break;
                case 1:
                    sql += " and isnull(" + colsl("ServicesList_Speed") + ",-1)=-1  order by 编号 asc";
                    break;
                case 2:
                    sql += " and isnull(" + colsl("ServicesList_Speed") + ",-1)<>-1 and isnull(" + colsl("ServicesList_IsFinish") + ",0)= 0  order by 编号 asc";
                    break;
                case 3:
                    sql += " and isnull(" + colsl("ServicesList_IsFinish") + ",0)=1 and isnull(" + colsl("ServicesList_IsSolve") + ",0)=0  order by 编号 asc";
                    break;
                case 4:
                    sql += " and isnull(" + colsl("ServicesList_IsSolve") + ",0)=1  order by 编号 asc";
                    break;
            }

namespace YXServicesSystem
{
    class ClassServices
    {
        public static int Expect_Minute = 2;
        public static int Expect_Hours = 3;
    }

class ClassServicesSpeed
    {
        public string GetSeeSQL(string col)
        {
            string sql = " case " + col + "";
            sql += "  when 0 then ‘开始‘  ";
            sql += "  when 8 then ‘接收进入‘  ";
            sql += "  when 10 then ‘接收‘  ";
            sql += "  when 18 then ‘出发进入‘  ";
            sql += "  when 20 then ‘出发‘  ";
            sql += "  when 28 then ‘到达进入‘  ";
            sql += "  when 30 then ‘到达‘  ";
            sql += "  when 31 then ‘延时‘  ";
            sql += "  when 48 then ‘售后单填写进入‘  ";
            sql += "  when 50 then ‘售后单填写完成‘  ";
            sql += "  when 58 then ‘技术员签字‘  ";
            sql += "  when 62 then ‘查看售后单‘  ";
            sql += "  when 64 then ‘客户评分‘  ";
            sql += "  when 68 then ‘客户签字进入‘  ";
            sql += "  when 70 then ‘客户签字‘  ";
            sql += "  when 78 then ‘完成进入‘  ";
            sql += "  when 80 then ‘完成‘  ";
            sql += "  when 100 then ‘返回公司‘  ";
            sql += "  when 110 then ‘下班回家‘  ";
            sql += "  when 120 then ‘继续其他售后‘  ";
            sql += "  when 158 then ‘返回公司到达进入‘  ";
            sql += "  when 160 then ‘返回公司到达‘  ";
            sql += "  when 200 then ‘回访‘  ";
            sql += "  else ‘无记录‘ end ";

return sql;
        }
        public string GetSeeSQL_ifserver(string col)
        {
            string sql = " case " + col + "";
            sql += "  when 0 then ‘无记录‘  ";
            sql += "  when 1 then ‘已解决‘  ";
            sql += "  when 2 then ‘未解决‘  ";
            sql += "  else ‘无记录‘ end ";

return sql;
        }
        /// <summary>
        /// 刻度尺背景图片
        /// </summary>
        //public static void back_image(PictureBox p)
        //{
        //    p.Size = new Size(118, 10);
        //    p.BackgroundImage = YXServicesSystem.Properties.Resources.刻度;
        //}
    }

/// <summary>
    /// 售后步骤值
    /// </summary>
    enum ServicesSpeed
    {
        开始 = 0,
        接收进入 = 8,
        接收 = 10,
        出发进入 = 18,
        出发 = 20,
        到达进入 = 28,
        到达 = 30,
        延时 = 31,//不修改Speed值
        售后单填写进入 = 48,
        售后单填写完成 = 50,
        技术员签字 = 58,
        查看售后单 = 62,
        客户评分 = 64,
        客户签字进入 = 68,
        客户签字 = 70,
        完成进入 = 78,
        完成 = 80,
        返回公司 = 100,
        下班回家 = 110,
        继续其他售后 = 120,
        返回公司到达进入 = 158,
        返回公司到达 = 160,
        回访 = 200,
    }
}

时间: 2024-08-26 23:14:30

C#改变查询出来的值的相关文章

AE IRasterCursor 改变栅格图层像素值

刚刚说的是获取像素值.如果要进一步改变像素值的话,需要用到IRasterEdit接口的Write方法.Write方法的参数有两个,一个是在栅格图像中的左上角位置(行列值不是坐标值),另一个就是获取像素值时提到的PixelBlock. 执行完Write方法后要对实现IRasterEdit接口的对象进行释放. 1 public void ChangePixelValue(double xMax, double xMin, double yMax, double yMin,double[,] Pixe

组件之间的通信(子组件-改变父组件的值)

在vue中,组件之间的通信,是不建议子组件改变父组件的值,因为一个父组件有可能会有很多子组件,改来改去会很难管理(别人都这样说,我信) 试试: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script src='../vue.js'> </script> </head> <bod

jQuery改变label/input的值,改变class,改变img的src

jQuery改变label/input的值,改变class,改变img的src jQuery改变label的值: $('#aID').text("New Value"); jQuery改变input的值: $('#aID').val("New Value"); jQuery改变class属性: $('#aID').attr('class', "newClass");//设置class $('#aID').addClass('newClass');

js/jquery获取文本框的值与改变文本框的值

我们就用它来学习获取文本框的值及改变文本框的值. 代码如下 复制代码 <script>function get1(){ document.getElementById("txtbox2").value=document.getElementById("txtbox").value; //获取文本框1的值,并赋值给文本框2}</script> <table width="500" border="0"

我错误的去试图用QList里面的at方法改变const常量的值

在做曲线工厂的程序的时候,我写了一行代码是这样的: AllLines.at(cruveSecions).p1().setY(20); AllLines是QList<QLineF>类型的,cruveSections是int类型的,这里我犯了一个很低级但是很容易犯的错误,我本是图个方便,然后导致AllLines里面的数据老是更新不了,我很纳闷,最后同事通过查API给我找出了错误的原因.是这样的QList里面通过at访问出来的是个常量,里面的值不能修改成功,但是我很纳闷编译器也不报错,我想可能是se

动态改变 PopupControlExtender 的 DynamicContextKey值

function onDetail(contextKey) {            document.getElementById('<%=Panel1.ClientID%>').style.display = 'inline'; var behavior = $find("<%=pce.ClientID%>");        if (behavior) {            behavior.populate(contextKey);        }

如何改变TextBox.PassWordChar的值 转

最近在做一个功能,点密码框右边的小眼睛显示密码, 可是要显示密码就需要改变TextBox.PassWordChar的值, 这样的话就必须知道char类型的初始值是什么了,经过查找发现,char类型的初始值是'\0', 于是方案就出来了 private void picb_ShowPWD_MouseDown(object sender, MouseEventArgs e) { txt_Password.PasswordChar = '\0'; } private void picb_ShowPWD

sql 在not in 子查询有null值情况下经常出现的陷阱

如果下:Table_A表和Table_B表,要求查询出在Table_A表中不在Table_B表中的记录. CREATE TABLE [dbo].[Table_A]( [ID] [nchar](10) NULL, [Name] [nchar](10) NULL ) ON [PRIMARY] GO ID Name 001 张三 002 李四 003 王五 CREATE TABLE [dbo].[Table_B]( [ID] [nchar](10) NULL, [Name] [nchar](10) N

jqueryui中改变datepicker的z-index值

今天遇到了一个关于div层覆盖的问题,我在同一个页面引入了jqueryui中的datepiker和百度编辑器,结果datepiker日期所在的div层被覆盖了.如图所示: 然后在firebug里查看,发现datepiker所在div层默认的z-index为1,而ueditor的却是999,所以被覆盖住了,所以只需要把datepiker的z-index调大就行了.那怎么修改呢?代码如下:   $('.date').datepicker({                     //改变z-ind