Exemple #1
0
    public static String AddReconciliation(string Clearing, string ReconciliaT, string ReconciliaPer, string Remarks
                                           , string Pspnum, string hospitalSelect1, string STime, string ETime)
    {
        string[] arr = null;

        RecipeModel rm   = new RecipeModel();
        DataTable   sdr1 = rm.AccountStatementInfo(Pspnum, STime, ETime, Convert.ToInt32(hospitalSelect1));

        arr = new string[sdr1.Rows.Count];

        for (var i = 0; i < sdr1.Rows.Count; i++)
        {
            arr[i] = sdr1.Rows[i]["id"].ToString();
        }

        int sdr = 0;

        //  string[] strRows1Id = strRowIDs.Split(',');
        DataBaseLayer db = new DataBaseLayer();

        // now:生成对账单时间
        System.DateTime now = new System.DateTime();
        now = System.DateTime.Now;
        string n = now.ToString();
        // ReconciliaT:对账时间
        string        current = now.ToString("yyyyMMddhhmmss");
        string        str     = "select id from Clearingparty where   ClearPName = '" + Clearing + "'";
        SqlDataReader sr      = db.get_Reader(str);

        if (sr.Read())
        {
            for (int i = 0; i < arr.Length; i++)
            {
                string Retime = sr["id"].ToString() + current;

                ClearingpartyHandler ch = new ClearingpartyHandler();

                sdr = ch.AddReconciliation1(Clearing, ReconciliaT, ReconciliaPer, Remarks, arr[i], n, Retime);
            }
        }

        return("");
    }
    }  //提供数据的方法

    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        RecipeModel rm = new RecipeModel();


        string Pspnum = "";

        if (p.extParam.ContainsKey("Pspnum"))
        {
            Pspnum = p.extParam["Pspnum"];
        }
        string STime = "";

        if (p.extParam.ContainsKey("STime"))
        {
            STime = p.extParam["STime"];
        }
        string ETime = "";

        if (p.extParam.ContainsKey("ETime"))
        {
            ETime = p.extParam["ETime"];
        }
        string hospitalId = "0";

        if (p.extParam.ContainsKey("hospitalId"))
        {
            hospitalId = p.extParam["hospitalId"];
        }


        result.table = rm.AccountStatementInfo(Pspnum, STime, ETime, Convert.ToInt32(hospitalId));


        dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr)
        {
            int b = Convert.ToInt32(dr["decscheme"].ToString());
            if (b == 1)
            {
                return("微压(密闭)解表(15min)");
            }
            else if (b == 2)
            {
                return("微压(密闭)汤药(15min)");
            }
            else if (b == 3)
            {
                return("微压(密闭)补药(15min)");
            }
            else if (b == 4)
            {
                return("常压解表(10min,10min)");
            }
            else if (b == 5)
            {
                return("常压汤药(20min,15min)");
            }
            else if (b == 6)
            {
                return("常压补药(25min,20min)");
            }
            else if (b == 20)
            {
                return("先煎解表(10min,10min,10min)");
            }
            else if (b == 21)
            {
                return("先煎汤药(10min,20min,15min)");
            }
            else if (b == 22)
            {
                return("先煎补药(10min,25min,20min)");
            }
            else if (b == 36)
            {
                return("后下解表(10min(3:7),10min)");
            }
            else if (b == 37)
            {
                return("后下汤药(20min(13:7),15min)");
            }
            else if (b == 38)
            {
                return("后下补药(25min(18:7),20min)");
            }
            else if (b == 81)
            {
                return("微压自定义");
            }
            else if (b == 82)
            {
                return("常压自定义");
            }
            else if (b == 83)
            {
                return("先煎自定义");
            }
            else
            {
                return("后下自定义");
            }
        };
        result.FieldFormator.Register("decscheme", proc3);

        dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr)
        {
            int a = Convert.ToInt32(dr["decmothed"].ToString());
            if (a == 1)
            {
                return("先煎");
            }
            else if (a == 2)
            {
                return("后下");
            }
            else
            {
                return("加糖加蜜");
            }
        };
        result.FieldFormator.Register("decmothed", proc4);
        dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr)
        {
            int a = Convert.ToInt32(dr["takeway"].ToString());
            if (a == 1)
            {
                return("水煎餐后");
            }
            else
            {
                return("");
            }
        };
        result.FieldFormator.Register("takeway", proc6);
        dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr)
        {
            int a = Convert.ToInt32(dr["dtbtype"].ToString());
            if (a == 1)
            {
                return("顺丰");
            }
            else if (a == 2)
            {
                return("圆通");
            }
            else
            {
                return("中通");
            }
        };
        result.FieldFormator.Register("dtbtype", proc5);
        return(result);
    }
Exemple #3
0
    //导出数据
    protected void Button1_Click(object sender, EventArgs e)
    {
        string[] arr       = null;
        string   strRowIDs = "";

        if (Request.QueryString["Pspnum"] != null || Request.QueryString["hospitalSelect"] != null || Request.QueryString["STime"] != null || Request.QueryString["ETime"] != null)
        {
            RecipeModel rm              = new RecipeModel();
            string      Pspnum          = Request.QueryString["Pspnum"];
            string      hospitalSelect  = Request.QueryString["id"];
            string      STime           = Request.QueryString["STime"];
            string      ETime           = Request.QueryString["ETime"];
            string      Pspnum1         = Request.QueryString["Pspnum"].ToString();
            string      hospitalSelect1 = Request.QueryString["hospitalSelect"].ToString();
            string      STime1          = Request.QueryString["STime"].ToString();
            string      ETime1          = Request.QueryString["ETime"].ToString();

            DataTable sdr1 = rm.AccountStatementInfo(Pspnum, STime, ETime, Convert.ToInt32(hospitalSelect1));

            arr = new string[sdr1.Rows.Count];
            int a = sdr1.Rows.Count;
            for (var i = 0; i < sdr1.Rows.Count; i++)
            {
                arr[i] = sdr1.Rows[i]["id"].ToString();

                strRowIDs = arr[i].ToString();
            }

            int    sdr           = 0;
            string Clearing      = Clearing1.Value;
            string ReconciliaT   = ReconciliaT1.Value;
            string ReconciliaPer = ReconciliaPer1.Value;
            string Remarks       = RemarksA.Value;
            //  string[] strRows1Id = strRowIDs.Split(',');
            DataBaseLayer db = new DataBaseLayer();
            // now:生成对账单时间
            System.DateTime now = new System.DateTime();
            now = System.DateTime.Now;
            string n = now.ToString();
            // ReconciliaT:对账时间
            string        current = now.ToString("yyyyMMddhhmmss");
            string        str     = "select id from Clearingparty where   ClearPName = '" + Clearing + "'";
            SqlDataReader sr      = db.get_Reader(str);
            if (sr.Read())
            {
                for (int i = 0; i < arr.Length; i++)
                {
                    string Retime = sr["id"].ToString() + current;

                    ClearingpartyHandler ch = new ClearingpartyHandler();

                    sdr = ch.AddReconciliation1(Clearing, ReconciliaT, ReconciliaPer, Remarks, arr[i], n, Retime);
                }
            }



            //    Response.Write("<script type='text/javascript'>refurbishFlexGridRecipe();</script>");

            /*     DataTable dt = null;
             *
             *   ClearingpartyHandler ch2 = new ClearingpartyHandler();
             *
             *   dt = ch2.SearchInfoabc(arr);
             *
             *   CreateExcel(dt, "application/ms-excel", "excel");*/
        }
    }