コード例 #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string        fileName = "文件名";
        ResultDataSet Rs2      = new ResultDataSet();
        database_inte db2      = new database_inte();

        ClsData dbobj = db2.DB2Obj;

        dbobj.BeginTrans("test");
        string sql1 = "insert into FileInfo (fileName,fileSize) values ('" + fileName + "','50')";
        string sql2 = "insert into FileType (typeName,parentID) values ('标题',0)";

        if (!dbobj.GetRs(sql1, out Rs2))
        {
            dbobj.RollBack("test");
            return;
        }
        if (!dbobj.GetRs(sql2, out Rs2))
        {
            dbobj.RollBack("test");
            Label1.Text = "失败";
            return;
        }
        if (dbobj.CommitTrans("test") == false)
        {
            dbobj.RollBack("test");
            Label1.Text = "失败";
            return;
        }

        Label1.Text = "成功";
    }
コード例 #2
0
    public static String GetProfiles()
    {
        ClsLogistic user     = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        return(DataJSon.fGetJson(user.getComboProfileActive()));
    }
コード例 #3
0
    public static String fGetExistUserNameDocument(string pDocumentTypeId, string pDni, string pUserName)
    {
        ClsLogistic cls  = new ClsLogistic();
        ClsData     data = new ClsData();

        return(cls.fGetExistUserNameDocument(pDocumentTypeId, pDni, pUserName).ToString());
    }
コード例 #4
0
ファイル: AjaxChart.aspx.cs プロジェクト: chenx/Ci40_1
    private void init()
    {
        ClsData data = new ClsData();

        DataTable dt = data.getDataTable();
        string[] seriesName = new string[] { "Series 1", "Series 2", "Series 3" };

        ClsAjaxChart chart = new ClsAjaxChart();
        /*
        chart.drawChart(chart1, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);
        chart.drawChart(chart2, dt, "Column Chart", seriesName, "Year", "Amount", SeriesChartType.Column);
        chart.drawChart(chart3, dt, "Bar Chart", seriesName, "Year", "Amount", SeriesChartType.Bar);
        chart.drawChart(chart4, dt, "Area Chart", seriesName, "Year", "Amount", SeriesChartType.Area);
        chart.drawChart(chart5, dt, "Pie Chart", seriesName, "Year", "Amount", SeriesChartType.Pie);
        chart.drawChart(chart6, dt, "Stock Chart", seriesName, "Year", "Amount", SeriesChartType.Stock);
        */

        DataTable dt2 = data.getDataTable2();

        dt2.TableName = "Line Chart";
        chart.drawLineChart(LineChart1, dt2);

        dt2.TableName = "Bar Chart";
        chart.drawBarChart(BarChart1, dt2);
    }
コード例 #5
0
        public ActionResult SyncData()
        {
            StringBuilder s = new StringBuilder();

            if (ClsData.btnSync == "")
            {
                ClsData.btnSync = Conn.getInfo("select HoTen from NhanVien where MaNV=" + int.Parse(CookieCls.GetMaNV()) + "");

                if (ClsData.listRequest.Count > 0)
                {
                    string insertdata = "";
                    for (int i = 0; i < ClsData.listRequest.Count; i++)
                    {
                        insertdata += "insert into rssNews(rssID,NewspaperMenuId,Title,IconRss,IconSave,Link,[Description],Summary,rssDate,DateInput,Effect,MaNV) values(" + string.Join(",", ClsData.listRequest[i]) + "," + CookieCls.GetMaNV() + ")";
                    }
                    Conn.InsertBatch(insertdata);
                }
                ClsData.ClearArray();

                db.mProcesses.RemoveRange(db.mProcesses);
                db.SaveChanges();
                //Conn.UpdateRowData("delete from mProcess");
            }
            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        public long Insert_Update_Customer(string Cust_Name, string Cust_FName, string Cust_MName, string Cust_LName, string Cust_Add1, string Cust_Add2,
                                           string Cust_City, string Cust_State, string Cust_Zip, string Cust_Ph1, string Cust_Ph2, DateTime Cust_DOB,
                                           string LicenseID, string SSN, DateTime LicIssuedON, DateTime LicExpiredON, string CreatedBy, char IsOFACVerified,
                                           string Cust_Message, string Cust_DBA, string Cust_EIN, string Cust_Height, string Cust_Weight, char Cust_Gender,
                                           double Fees, string Cust_IDType, string Mode)
        {
            try
            {
                long ReturnVal = 0;
                objData = new ClsData();

                //ReturnVal = objData.Insert_Update_Customer(Cust_Name, Cust_FName, Cust_MName, Cust_LName, Cust_Add1, Cust_Add2, Cust_City, Cust_State, Cust_Zip, Cust_Ph1, Cust_Ph2, Cust_DOB, LicenseID, SSN, LicIssuedON, LicExpiredON, CreatedBy, IsOFACVerified, Cust_Message, Cust_DBA, Cust_EIN, Cust_Height, Cust_Weight, Cust_Gender, Cust_IDType, Mode);

                if (ReturnVal > 0)
                {
                    return(ReturnVal);
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
コード例 #7
0
ファイル: Profiles.aspx.cs プロジェクト: afranc9/Consulta
    public static String LoadPagesMenu()
    {
        ClsLogistic cls      = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        return(DataJSon.fGetJson(cls.getMenuPages()));
    }
コード例 #8
0
ファイル: Profiles.aspx.cs プロジェクト: afranc9/Consulta
    public static String fGetExistuserWithProfile(string pProfileId)
    {
        ClsLogistic cls  = new ClsLogistic();
        ClsData     data = new ClsData();

        return(cls.fGetExistuserWithProfile(pProfileId).ToString());
    }// fin de la funcion
コード例 #9
0
ファイル: Profiles.aspx.cs プロジェクト: afranc9/Consulta
    public static String LoadProfileMenu(string pProfile)
    {
        ClsLogistic user = new ClsLogistic();
        ClsData     data = new ClsData();

        return(data.fGetJson(user.getMenuByProfile(pProfile)));
    }
コード例 #10
0
ファイル: Profiles.aspx.cs プロジェクト: afranc9/Consulta
    public static String Crud_Profiles(int pType, string pProfileId, string pProfile, string xDetail)
    {
        ClsLogistic user = new ClsLogistic();
        ClsData     data = new ClsData();

        return(user.CRUD_PROFILE_MENU(pType, pProfileId, pProfile, xDetail));
    }
コード例 #11
0
ファイル: Profiles.aspx.cs プロジェクト: afranc9/Consulta
    public static String GetComboProfiles()
    {
        ClsLogistic user = new ClsLogistic();
        ClsData     data = new ClsData();

        return(data.fGetJson(user.getComboProfile()));
    }
コード例 #12
0
    public static String GetThemeById(string pIdTheme)
    {
        ClsLogistic log      = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        return(DataJSon.fGetJson(log.getThemeById(pIdTheme)));
    }
コード例 #13
0
        private void btnCalcular_Click(object sender, EventArgs e)
        {
            try
            {
                ClsData data = new ClsData();

                if (data.StringEmpty(mskData.Text))
                {
                    throw new Exception("Data inválida");
                }

                if (data.StringEmpty(txtOperador.Text))
                {
                    throw new Exception("Operador não foi informado.");
                }

                if (data.StringEmpty(txtValor.Text))
                {
                    throw new Exception("Valor não foi informado.");
                }


                txtDataFinal.Text = data.CalcularData(mskData.Text, Convert.ToChar(txtOperador.Text), long.Parse(txtValor.Text));
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Verifique os campos. {ex.Message}");
            }
        }
コード例 #14
0
ファイル: Waiters.aspx.cs プロジェクト: cvaca7/Black-Mammouth
 public static string GetGridDataDetail(string xWaiter)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     System.Data.DataTable dt = new System.Data.DataTable("data");
     dt = lst.fgetWaiterDetail(xWaiter);
     return data.fGetJson(dt);
 }
コード例 #15
0
    public static String GetUser(String userName)
    {
        ClsLogistic log      = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        bool isAdmin = true;

        return(DataJSon.fGetJson(log.getUsers(isAdmin, userName)));
    }
コード例 #16
0
ファイル: Dashboard.aspx.cs プロジェクト: afranc9/Consulta
    public static String LoadMenu()
    {
        MembershipUser currentUser = Membership.GetUser();
        string         user        = currentUser.UserName.ToString();

        ClsLogistic cls      = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        return(DataJSon.fGetJson(cls.getMenu(user)));
    }
コード例 #17
0
    public static String GetGridData()
    {
        ClsLogistic log      = new ClsLogistic();
        ClsData     DataJSon = new ClsData();

        MembershipUser currentUser = Membership.GetUser();
        string         user        = currentUser.UserName.ToString();
        bool           isAdmin     = HttpContext.Current.Session["Profile"].ToString() == "1" ? false : true;

        return(DataJSon.fGetJson(log.getUsers(isAdmin, user)));
    }
コード例 #18
0
    public static string LoadCombos(string xType)
    {
        ClsRpt lst = new ClsRpt();
        System.Data.DataTable dt = new System.Data.DataTable();
        if (xType == "1")
            dt = lst.fgetProducts();
        else if (xType == "2")
            dt = lst.fgetSuppliers();

        ClsData data = new ClsData();
        return data.fGetJson(dt);
    }
コード例 #19
0
    public static string getProductFind(string reference)
    {
        clsLst lst = new clsLst();
        ClsData data = new ClsData();

        if (lst.findProductByReference(reference).Rows.Count <= 0)
        {
            return "error";
        }
        else
        {
            return data.fGetJson(lst.findProductByReference(reference));
        }
    }
コード例 #20
0
        public bool UpdateIsProcessMEMO(string Cust_ID, string AccountNo, string UtilityCode, string Isdelete)
        {
            objData = new ClsData();
            bool OutFlg = objData.UpdateCustomerUtility(Cust_ID, AccountNo, UtilityCode, Isdelete);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #21
0
        public bool InsertMEMO_EventLog(string EventDisc, string OperatorId, int StoreID, int AgentID)
        {
            objData = new ClsData();
            bool OutFlg = objData.InsertMEMO_EventLog(EventDisc, OperatorId, StoreID, AgentID);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #22
0
        public bool Collected(int custid, int tranid, double chkamt)
        {
            objData = new ClsData();
            bool OutFlg = objData.Collected(custid, tranid, chkamt);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #23
0
        public bool UpdateIsProcessMEMO(int StoreID, string Flg)
        {
            objData = new ClsData();
            bool OutFlg = objData.UpdateIsProcessMEMO(StoreID, Flg);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #24
0
        public bool IsBadprocedure(int custid, int transid, double chkamt, string remark)
        {
            objData = new ClsData();
            bool OutFlg = objData.IsBadprocedure(custid, transid, chkamt, remark);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #25
0
        public bool UpdateEmpPasscode(long MoID, long EmpId, string Passcode, string Flg)
        {
            objData = new ClsData();
            bool OutFlg = objData.UpdateEmpPasscode(MoID, EmpId, Passcode, Flg);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #26
0
        public bool UpdateUtility(string Cust_ID, string AccountNo, string UtilityCode)
        {
            objData = new ClsData();
            bool OutFlg = objData.UpdateUtility(Cust_ID, AccountNo, UtilityCode);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #27
0
        public bool LoadMEMO(int StoreID, int StartSeq, int EndSeq, int CurrentSeq, int StartChkNo, int EndChkNo, int NumberOfMemoLeft, string IsProcessIOG, int CreatedBy)
        {
            objData = new ClsData();
            bool OutFlg = objData.LoadMEMO(StoreID, StartSeq, EndSeq, CurrentSeq, StartChkNo, EndChkNo, NumberOfMemoLeft, IsProcessIOG, CreatedBy);

            if (OutFlg == true)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #28
0
        public ActionResult ResetData()
        {
            StringBuilder s = new StringBuilder();

            ClsData.ClearArray();
            //Conn.UpdateRowData("delete from mProcess");
            db.mProcesses.RemoveRange(db.mProcesses);
            db.SaveChanges();
            int async = ClsData.countRequest - (ClsData.countRequestSuccess + ClsData.countRequestFail + ClsData.countRequestDup);

            s.Append("<strong id='msgArray' style='color: white; font-weight: bold; font-size: 20px'>" + ClsData.countRequestSuccess + " (R=" + ClsData.countRequest + " S=" + ClsData.countRequestSuccess + " D=" + ClsData.countRequestDup + " F=" + ClsData.countRequestFail + " <strong style='color:Red'>W=" + async + "</strong>)</strong>");
            string shtml = "" + s;

            return(Json(new { success = true, async, shtml }, JsonRequestBehavior.AllowGet));
        }
コード例 #29
0
    public static string CrudSupplier(int id, string name, int typeid, string contact1, string tel1, string contact2, string tel2, int type, string user, int pay)
    {
        clsLst lst = new clsLst();
        lst.iSupplierId = id;
        lst.sname = name;
        lst.iSupplierType = typeid;
        lst.iSupplierPay = pay;
        lst.scontact1 = contact1;
        lst.stel1 = tel1;
        lst.scontact2 = contact2;
        lst.stel2 = tel2;
        lst.sUser = user;
        ClsData data = new ClsData();

        string result = lst.InsertUpdateDeleteSuppliers(type);

        return result;
    }
コード例 #30
0
        public DataSet GetAllGroups()
        {
            objData = new ClsData();
            DataSet dsAIPLData = new DataSet("AIPLData");

            try
            {
                if ((dtResult.Columns.Count == 0))
                {
                    dtResult.Columns.Add("Result");
                    dtResult.Columns.Add("Code");
                    dtResult.Columns.Add("Description");
                    dtResult.Rows.Add();
                }

                dsAIPLData = objData.GetAllGroups();
                if (dsAIPLData != null)
                {
                    dtResult.Rows[0]["Result"]      = "A";
                    dtResult.Rows[0]["Code"]        = "000";
                    dtResult.Rows[0]["Description"] = "Success";
                    dtResult.AcceptChanges();

                    dsAIPLData.Tables.Add(dtResult.Copy());
                    dsAIPLData.Tables[0].TableName = "GrpList";
                }
                else
                {
                    dtResult.Rows[0]["Result"]      = "R";
                    dtResult.Rows[0]["Code"]        = "001";
                    dtResult.Rows[0]["Description"] = "No Data Found";
                    dtResult.AcceptChanges();
                    dsAIPLData = new DataSet();
                    dsAIPLData.Tables.Add(dtResult.Copy());
                }
                return(dsAIPLData);
            }
            catch (Exception ex)
            {
                SendEMail(ErrorMailSendTo, "GetAllGroups", ex.Message.ToString());
                return(null);
            }
        }
コード例 #31
0
        public long MEMO_Transaction(int PID, int BatchID, int CustID, System.DateTime TransDate, double TransAmt, long SerialNo, string CreatedBy, string CmpName, int ChkNo, int StoreID, int StationID, double Fees, int ServiceID, int RID, int Mode, int Qty, int Disc, int ExeId, string ServiceName)
        {
            try
            {
                long ReturnVal = 0;
                objData = new ClsData();
                //ReturnVal = objData.MEMO_Transaction(PID, BatchID, CustID, TransDate, TransAmt, SerialNo, CreatedBy, CmpName, ChkNo, StoreID, StationID, Fees, RID, Mode, Qty, Disc, ExeId, ServiceName);

                if (ReturnVal > 0)
                {
                    return(ReturnVal);
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
コード例 #32
0
ファイル: AspChartDynamic.aspx.cs プロジェクト: chenx/Ci40_1
    private void init()
    {
        this.Title = "Dynamic ASP Chart";
        ClsData data = new ClsData();

        DataTable dt = data.getDataTable();
        string[] seriesName = new string[] { "Series 1", "Series 2", "Series 3" };

        ClsAspChart chart = new ClsAspChart();
        chart.drawChart(chart1, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);

        //panel1.Width = 500;

        for (int i = 0; i < 2; ++i)
        {
            chart.appendDynamicChart(panel1, 500, 300, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Column Chart", seriesName, "Year", "Amount", SeriesChartType.Column);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Bar Chart", seriesName, "Year", "Amount", SeriesChartType.Bar);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Area Chart", seriesName, "Year", "Amount", SeriesChartType.Area);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Pie Chart", seriesName, "Year", "Amount", SeriesChartType.Pie);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Stock Chart", seriesName, "Year", "Amount", SeriesChartType.Stock);
        }
    }
コード例 #33
0
 public static string GetProducts()
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.dataProducts());
 }
コード例 #34
0
 public static string getcomboSupplier()
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.comboSupplier());
 }
コード例 #35
0
 public static string getcomboCategory()
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.comboProductCategory());
 }
コード例 #36
0
 public static string getdataEntryDetail(int entryId)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.getProductEntryDetail(entryId));
 }
コード例 #37
0
 public static string GetProduct(int productid)
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.getProductById(productid));
 }
コード例 #38
0
 public static string LoadCombos(string xType)
 {
     ClsRpt lst = new ClsRpt();
     ClsData data = new ClsData();
     return data.fGetJson(lst.fgetWaiters());
 }
コード例 #39
0
 public static string GetData(String IniDate, String EndDate)
 {
     ClsRpt clsFront = new ClsRpt();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.fgetRptInvoices(IniDate,EndDate));
 }
コード例 #40
0
 public static string GetWaiters()
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.fgetWaiters());
 }
コード例 #41
0
 public static string getWaiterIdInvoicebyTableId(int tableid)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return lst.GetFirstWaiterIdTableInvoices(tableid).ToString();
 }
コード例 #42
0
 public static string GetTableAviables(int tableid)
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.getTablesAviables(tableid));
 }
コード例 #43
0
        public DataSet Login_RegisterStatus(string UserName, string Password, string SysDt, int StoreID, int StationID)
        {
            objData = new ClsData();
            DataSet dsAIPLData = new DataSet("AIPLData");

            if ((dtResult.Columns.Count == 0))
            {
                dtResult.Columns.Add("Result");
                dtResult.Columns.Add("Code");
                dtResult.Columns.Add("Description");
                dtResult.Rows.Add();
            }

            try
            {
                dsAIPLData = objData.Login_RegisterStatus(UserName, Password, SysDt, StoreID, StationID);

                if (dsAIPLData != null)
                {
                    if (dsAIPLData.Tables[0].Rows.Count > 0)
                    {
                        dtResult.Rows[0]["Result"]      = "A";
                        dtResult.Rows[0]["Code"]        = "000";
                        dtResult.Rows[0]["Description"] = "Success";
                        dtResult.AcceptChanges();
                        dsReturn.Tables.Add(dtResult);

                        for (int intFor = 0; intFor <= dsAIPLData.Tables.Count - 1; intFor++)
                        {
                            dsReturn.Tables.Add(dsAIPLData.Tables[intFor].Copy());
                        }
                    }
                }
                else
                {
                    dtResult.Rows[0]["Result"]      = "R";
                    dtResult.Rows[0]["Code"]        = "001";
                    dtResult.Rows[0]["Description"] = "No record found!";

                    dtResult.AcceptChanges();
                    dsReturn.Tables.Add(dtResult);
                }
                return(dsReturn);
            }
            catch (Exception ex)
            {
                SendEMail(ErrorMailSendTo, "Login_RegisterStatus", ex.Message.ToString());
                dtResult.Rows[0]["Result"]      = "R";
                dtResult.Rows[0]["Code"]        = "001";
                dtResult.Rows[0]["Description"] = ex.Message.ToString();

                dtResult.AcceptChanges();
                dsReturn.Tables.Add(dtResult);
                return(dsReturn);
            }
            finally
            {
                dsAIPLData = null;
                objData    = null;
            }
        }
コード例 #44
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ClsData dbobj       = db2.DB2Obj;
        string  filestate   = ddlState.SelectedValue;
        string  name        = txtname.Text.ToString();
        string  tel         = txttel.Text.ToString();
        string  revise_time = txtrevise_time.Text.ToString();
        string  long_time   = txtlong_time.Text.ToString();
        string  sql3        = "update FileInfo set filestate='" + filestate + "',name='" + name + "',tel='" + tel + "',revise_time='" + revise_time + "',long_time='" + long_time + "' where id=" + this.id + "";

        if (!dbobj.Exec(sql3))
        {
            dbobj.RollBack("fileInfo");
            Response.Write("<script>alert('更新失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
            Response.End();
        }
        Response.Redirect(Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.typeid.ToString()));
        //HttpPostedFile _upfile = FileUpload1.PostedFile;
        //if (FileUpload1.HasFile == true)
        //{
        //    if (FileUpload1.PostedFile.ContentLength > 1073741824)
        //    {
        //        Response.Write("<script>alert('文件过大,请控制在1G以内!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //        Response.End();
        //    }
        //    string rename = txtRename.Text.ToString();
        //    UpLoad upFiles = new UpLoad();
        //    ArrayList array;
        //    if (!String.IsNullOrEmpty(rename))
        //    {
        //        array = upFiles.fileSaveAs2(_upfile, rename);
        //    }
        //    else
        //    {
        //        array = upFiles.fileSaveAs2(_upfile, null);
        //    }

        //    if (array.Count > 0)
        //    {
        //        string fileName = array[2].ToString();
        //        string fileSize = array[1].ToString();
        //        string filePath = array[3].ToString();
        //        string fileExt = array[0].ToString();
        //        string version = txtVersion.Text.ToString();
        //        string username = "******";
        //        string add_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        //        ClsData dbobj = db2.DB2Obj;
        //        ResultDataSet Rs2 = new ResultDataSet();
        //        string sql = "select fileVersion from FileInfo where fileVersion='" + version + "'";
        //        if (dbobj.GetRs(sql, out Rs2) && Rs2.RowCount > 0 && !String.IsNullOrEmpty(Rs2[0, "fileVersion"].ToString()))
        //        {
        //            dbobj.BeginTrans("fileInfo");
        //            string sql3 = "update FileInfo set fileName='" + fileName + "',fileSize='" + fileSize + "',filePath='" + filePath + "',username='******',add_time='" + add_time + "',fileExt='" + fileExt + "' where fileVersion='" + Rs2[0, "fileVersion"].ToString() + "'";
        //            if (!dbobj.Exec(sql3))
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('更新失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();
        //            }

        //            string sql1 = "insert into FileInfoChild (fileName,fileSize,filePath,username,add_time,fileExt,fileType,fileVersion) values ('" + fileName + "','" + fileSize + "','" + filePath + "','" + username + "','" + add_time + "','" + fileExt + "'," + this.id + ",'" + version + "')";
        //            if (!dbobj.Exec(sql1))
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('提交失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();
        //            }
        //            if (dbobj.CommitTrans("fileInfo") == false)
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('提交事务失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();
        //            }
        //        }
        //        else
        //        {
        //            dbobj.BeginTrans("fileInfo");
        //            string sql1 = "insert into FileInfoChild (fileName,fileSize,filePath,username,add_time,fileExt,fileType,fileVersion) values ('" + fileName + "','" + fileSize + "','" + filePath + "','" + username + "','" + add_time + "','" + fileExt + "'," + this.id + ",'" + version + "')";
        //            string sql2 = "insert into FileInfo (fileName,fileSize,filePath,username,add_time,fileExt,fileType,fileVersion) values ('" + fileName + "','" + fileSize + "','" + filePath + "','" + username + "','" + add_time + "','" + fileExt + "'," + this.id + ",'" + version + "')";
        //            if (!dbobj.Exec(sql1))
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('提交失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();

        //            }
        //            if (!dbobj.Exec(sql2))
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('提交失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();
        //            }
        //            if (dbobj.CommitTrans("fileInfo") == false)
        //            {
        //                dbobj.RollBack("fileInfo");
        //                Response.Write("<script>alert('提交失败,请稍后再试!');window.location.href ='" + Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()) + "'</script>");
        //                Response.End();
        //            }
        //        }

        //        Response.Redirect(Utils.CombUrlTxt("category_list_item.aspx", "id={0}", this.id.ToString()));
        //    }
        //}
        //else
        //{
        //    Response.Write("<script>alert('请选择要上传的文件!');</script>");
        //}
    }
コード例 #45
0
        public DataSet MEMO_DailyTransaction(string SysDate, int EmpId, int StoreID)
        {
            objData = new ClsData();
            DataSet dsAIPLData = new DataSet("AIPLData");

            if ((dtResult.Columns.Count == 0))
            {
                dtResult.Columns.Add("Result");
                dtResult.Columns.Add("Code");
                dtResult.Columns.Add("Description");
                dtResult.Rows.Add();
            }

            try
            {
                dsAIPLData = objData.MEMO_DailyTransaction(SysDate, EmpId, StoreID);

                if (dsAIPLData != null)
                {
                    if (dsAIPLData.Tables[0].Rows.Count > 0)
                    {
                        dtResult.Rows[0]["Result"]      = "A";
                        dtResult.Rows[0]["Code"]        = "000";
                        dtResult.Rows[0]["Description"] = "Success";
                        dtResult.AcceptChanges();
                        dsReturn.Tables.Add(dtResult);

                        for (int intFor = 0; intFor <= dsAIPLData.Tables.Count - 1; intFor++)
                        {
                            dsReturn.Tables.Add(dsAIPLData.Tables[intFor].Copy());
                        }
                    }
                }
                else
                {
                    dtResult.Rows[0]["Result"]      = "R";
                    dtResult.Rows[0]["Code"]        = "001";
                    dtResult.Rows[0]["Description"] = "No record found!";

                    dtResult.AcceptChanges();
                    dsReturn.Tables.Add(dtResult);
                }
                return(dsReturn);
            }
            catch (Exception ex)
            {
                SendEMail(ErrorMailSendTo, "MEMO_DailyTransaction", ex.Message.ToString());
                dtResult.Rows[0]["Result"]      = "R";
                dtResult.Rows[0]["Code"]        = "001";
                dtResult.Rows[0]["Description"] = ex.Message.ToString();

                dtResult.AcceptChanges();
                dsReturn.Tables.Add(dtResult);
                return(dsReturn);
            }
            finally
            {
                dsAIPLData = null;
                objData    = null;
            }
        }
コード例 #46
0
 public static string GetGridData()
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.fGetCloseDays());
 }
コード例 #47
0
 public static string InsertProductToInvoice(int invoiceid,int productid, int quantity, int price, string user)
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return clsFront.InsertUpdateDeleteProductInvoiceDetail(clsFront.TYPE_INSERT);
 }
コード例 #48
0
 public static String GetPartners()
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.dataSuppliers());
 }
コード例 #49
0
//		private void NullGraph()
//		{
//			object [] ar = new object[3];
//
//			DataTable table = new DataTable();
//
//			table.Columns.Add("GroupName",typeof(int));
//			table.Columns.Add("my_X",typeof(int));
//			table.Columns.Add("my_Y",typeof(int));
//
//			DataRow row = table.NewRow();
//			ar[0] = "1";
//			ar[1] = 0;
//			ar[2] = 0;
//			row.ItemArray = ar;
//			table.Rows.Add(row);
//
//			ultraChart1.DataSource = table;
//			ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//			ultraChart1.ScatterChart.ConnectWithLines = true;
//		}


        public void GraphDraw_Step()
        {
            DataPlotter.DataSeries pSeries1;

            //plotter1.ColorBg = Color.LightYellow;
            plotter1.ColorGrid = Color.LightGray;
            //plotter1.XLogBase = 0;
            plotter1.XRangeStart = 0;
            plotter1.XRangeEnd   = 8000;
            plotter1.XGrid       = 1000;
            //plotter1.YLogBase = 0;
            plotter1.YRangeStart = 0;
            plotter1.YRangeEnd   = 1;
            plotter1.YGrid       = 0.2;
            plotter1.Series.Clear();

            plotter1.bIsColorMap = true;
            plotter1.IsOctave    = true;

            bool DataExist = false;

            plotter1.Series.Clear();

            if (SAClass1 != null)
            {
                #region 예전
//				object [] ar = new object[3];
//
//				DataTable table = new DataTable();
//
//				table.Columns.Add("GroupName",typeof(int));
//				table.Columns.Add("my_X",typeof(double));
//				table.Columns.Add("my_Y",typeof(double));
                #endregion

                // Z 값을 구한다
                SAClass1.Cal_Z_Data();

                for (int i = 0; i < SAClass1.Sgraph.Count; i++)
                {
                    ClsData cls = (ClsData)SAClass1.Sgraph[i];

                    pSeries1 = new DataPlotter.DataSeries();

                    pSeries1.Name  = "Data 01";
                    pSeries1.Color = Color.Blue;

                    #region 예전
//					for(int j = 0 ; j < cls.GetCount() ; j++)
//					{
//						DataRow row = table.NewRow();
//						ar[0] = i.ToString();
//						ar[1] = cls.GetData(j).ToString();
//						ar[2] = cls.GetData(j).ToString();
//						row.ItemArray = ar;
//						table.Rows.Add(row);
//					}
                    #endregion

                    pSeries1.XData = SAClass1.Frequency.GetData();
                    pSeries1.YData = cls.GetData();

                    // Z 값을 넣는다
                    pSeries1.ZData    = new double[1];
                    pSeries1.ZData[0] = SAClass1.Get_Z_Data(i);

                    DataExist = true;

                    plotter1.Series.Add(pSeries1);
                }

                if (DataExist == true)
                {
                    #region 예전
//					ultraChart1.DataSource = table;
//					ultraChart1.ScatterChart.IconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Small;
//					ultraChart1.ScatterChart.ConnectWithLines = true;
                    #endregion

                    plotter1.YLabel   = "Parameter Value";
                    plotter1.Interval = 2;
                    plotter1.AutoRange();
                    plotter1.Refresh();
                }
            }
        }
コード例 #50
0
    public static string savePays(int invoiceid, string idpago, string desc, string value)
    {
        clsLst lst = new clsLst();
        ClsData data = new ClsData();

        lst.iInvoiceId = invoiceid;
        string result = lst.InsertInvoicePays(idpago, desc, value);
        return result;
    }
コード例 #51
0
 public static string getCountInvoicesByTableId(int tableid)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return lst.getCountInvoicesByTableId(tableid).ToString();
 }
コード例 #52
0
ファイル: Tables.aspx.cs プロジェクト: cvaca7/Black-Mammouth
 public static String GetTables()
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.GetTables());
 }
コード例 #53
0
 public static string getDataPayType()
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.getdataPayType());
 }
コード例 #54
0
 public static string getSupplierTypePay(int id)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
     return data.fGetJson(lst.comboSupplierPreferenceType());
 }
コード例 #55
0
 public static string GetGridData(string pWaiter, string pIniDate, string pEndDate)
 {
     ClsRpt lst = new ClsRpt();
     ClsData data = new ClsData();
     return data.fGetJson(lst.fgetRptWaiters(pWaiter, pIniDate, pEndDate));
 }
コード例 #56
0
 public static string GetInvoiceDetail(int invoiceid)
 {
     clsLst clsFront = new clsLst();
     ClsData DataJSon = new ClsData();
     return DataJSon.fGetJson(clsFront.getInvoiceDetail(invoiceid));
 }
コード例 #57
0
 public static string getInvoicesByTableId(int tableid)
 {
     clsLst lst = new clsLst();
     ClsData data = new ClsData();
        return data.fGetJson(lst.getInvoicesByTableId(tableid));
 }
コード例 #58
0
 public static string GetGridData(string pProduct, string pSupplier, string pIniDate, string pEndDate)
 {
     ClsRpt lst = new ClsRpt();
     ClsData data = new ClsData();
     return data.fGetJson(lst.fgetRptProducts(pProduct,pSupplier,pIniDate, pEndDate));
 }