예제 #1
0
    public static String AddReconciliation(string strRowIds, string Clearing, string ReconciliaT, string ReconciliaPer, string Remarks)
    {
        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())
        {
            string Retime           = sr["id"].ToString() + current;
            ClearingpartyHandler ch = new ClearingpartyHandler();
            for (int i = 0; i < strRows1Id.Length; i++)
            {
                sdr = ch.AddReconciliation(Clearing, ReconciliaT, ReconciliaPer, Remarks, strRows1Id[i], n, Retime);
            }
        }

        return("");
    }
예제 #2
0
    //导出数据
    protected void Button1_Click(object sender, EventArgs e)
    {
        string strRowIds = "";

        if (Request.QueryString["id"] != null)
        {
            string id = Request.QueryString["id"];

            strRowIds = Request.QueryString["id"].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())
        {
            string Retime           = sr["id"].ToString() + current;
            ClearingpartyHandler ch = new ClearingpartyHandler();
            for (int i = 0; i < strRows1Id.Length; i++)
            {
                sdr = ch.AddReconciliation(Clearing, ReconciliaT, ReconciliaPer, Remarks, strRows1Id[i], n, Retime);
            }
        }



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

        //Response.Write("<script language='javascript'>closeDiv();</script>");
    }
예제 #3
0
    public static string updateInfo(string id, string dPer)
    {
        ClearingpartyHandler dm = new ClearingpartyHandler();

        int result = dm.update(id, dPer);

        string str = null;

        if (result == 0)
        {
            str = "0";
        }
        else
        {
            str = "1";
        }

        return(str);
    }
예제 #4
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("");
    }
예제 #5
0
    public static string addClearingpartyinfo(string ClearPName, string ConPerson, string ConPhone, string Address, string Remarks, string GenDecoct)
    {
        string result = "";


        //string str2 = str1.TrimStart('0');
        ClearingpartyHandler wr = new ClearingpartyHandler();

        int sdr = wr.AddClearingparty(ClearPName, ConPerson, Address, ConPhone, Remarks, GenDecoct);

        if (sdr == 0)
        {
            result = "0";
        }
        else
        {
            result = "1";
        }

        return(result);
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            string id = Request.QueryString["id"];
            idnum.Value = Request.QueryString["id"];

            ClearingpartyHandler ch = new ClearingpartyHandler();
            DataTable            dt = ch.findInfo(id);
            dPer.Value = dt.Rows[0]["ReconciliaPer"].ToString();
        }
        ClearingpartyHandler ch1 = new ClearingpartyHandler();
        SqlDataReader        sdr = ch1.findInfo();

        /* if (sdr != null)
         * {
         *   while (sdr.Read())
         *   {
         *
         *       this.dPer.Items.Add(new ListItem(sdr["ReconciliaPer"].ToString()));
         *
         *   }
         * }*/
    }
예제 #7
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");*/
        }
    }