コード例 #1
0
        public string getRuningNoDoc()
        {
            //Format yyyyMMdd-01   2018011501


            System.Globalization.CultureInfo cultureinfo = new System.Globalization.CultureInfo("en-US");


            clsDB  db  = new clsDB();
            string sql = null;
            string curDate;

            curDate = DateTime.Now.ToString("yyyyMMdd", cultureinfo);
            //DateTime dateEng = Convert.ToDateTime(curDateTmp, cultureinfo);
            //curDate = dateEng.ToString("yyyyMMdd");


            sql = "Select doc_id From Document where doc_id like '" + curDate + "%'";
            object    MyScalar = null;
            DataTable dt;

            dt = db.ExecuteDataTable(sql);
            db.Close();
            db.Dispose();
            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    sql      = "Select Max(doc_id) + 1 From Document";
                    MyScalar = db.ExecuteScalar(sql);
                    return(MyScalar.ToString());
                }
                else
                {
                    return(curDate.ToString() + "01");
                }
            }



            if (MyScalar != null)
            {
            }
            else
            {
            }


            return(curDate);
        }
コード例 #2
0
ファイル: DataDocument2.aspx.cs プロジェクト: hoolanla/PRPO
        private void BindGrid()
        {
            Class.clsDB DB  = new Class.clsDB();
            string      sql = "select doc_id,doc_name,content,create_by,create_date,secure_prepare,step1,step2,step3,step4,secure_approve,approve_problem From document order by doc_id desc";
            DataTable   dt;

            dt = DB.ExecuteDataTable(sql);
            DB.Close();
            DB.Dispose();
            grid.DataSource = dt;
            Session["DT"]   = dt;
            // grid.DataKeyNames = "doc_id";
            grid.DataBind();
        }
コード例 #3
0
        private void BindGrid()
        {
            Class.clsDB DB  = new Class.clsDB();
            string      sql = "select * From Supplier order by supp_short_name";

            DataTable dt;

            dt = DB.ExecuteDataTable(sql);
            DB.Close();
            DB.Dispose();

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();

            Session["DT"] = dt;
        }
コード例 #4
0
ファイル: DataDocument.aspx.cs プロジェクト: hoolanla/PRPO
        private void BindGrid()
        {
            Class.clsDB DB  = new Class.clsDB();
            string      sql = "select doc_id,doc_name,content,create_by,create_date,secure_prepare,step1,step2,step3,step4,";

            sql += "secure_approve,approve_problem,supplier_id,supplier_name,page_count,paper_type,attach_file_name";
            sql += " From document order by doc_id desc";
            DataTable dt;

            dt = DB.ExecuteDataTable(sql);
            DB.Close();
            DB.Dispose();

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();

            Session["DT"] = dt;
        }
コード例 #5
0
        private void BindGrid()
        {
            Class.clsDB DB  = new Class.clsDB();
            string      sql = "select po.doc_id,po.doc_name,po.content,po.create_by,po.create_date,po.secure_prepare,po.paper_type,po.page_count,";

            sql += " po.step1,po.step2,po.step3,po.step4,po.secure_approve,po.approve_problem,po.attach_file_name,pr.supplier_name";
            sql += " From po_document as po,document as pr";
            sql += " where po.step1 = 1 and po.doc_id = pr.doc_id  order by po.doc_id desc";
            DataTable dt;

            dt = DB.ExecuteDataTable(sql);
            DB.Close();
            DB.Dispose();

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();

            Session["DT"] = dt;
        }