当前位置: 首页>>代码示例>>C#>>正文


C# Product.GetDateSet方法代码示例

本文整理汇总了C#中Product.GetDateSet方法的典型用法代码示例。如果您正苦于以下问题:C# Product.GetDateSet方法的具体用法?C# Product.GetDateSet怎么用?C# Product.GetDateSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Product的用法示例。


在下文中一共展示了Product.GetDateSet方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetProductDataSource

    public DataSet GetProductDataSource()
    {
        DataSet ds;
        //if (this.SelStorageNo == "-1")
        //{
        //    return null;

        //}
        Product product = new Product();
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(string.Format(@"SELECT     Product.Product_ID, Shop.Name as shopname, SaleRecord.ShopId, Product.Barcode, Product.Product_Name, SaleRecord.CouponsNo, SaleRecord.CouponsPrice,
                      SaleRecord.SalePrice, SaleRecord.Discount, SaleRecord.SaleLsh, SaleRecord.Sales, SaleRecord.SaleTime, SaleRecord.InVoiceNo,
                      SaleRecord.CustomerName, SaleRecord.CustomerPhone, SaleRecord.VisaMoney, SaleRecord.CashMoney, SaleRecord.TrueMoney,
                      SaleRecord.UserCardMoney,SaleRecord.Bz
        FROM         Sale_Product INNER JOIN
                      SaleRecord ON Sale_Product.SaleId = SaleRecord.Id INNER JOIN
                      Shop ON SaleRecord.ShopId = Shop.Id INNER JOIN
                      Product ON Sale_Product.ProductId = Product.Product_ID and convert(char(10),SaleTime,102)>= '{0}' and convert(char(10),SaleTime,102)<='{1}' ",
           this.StartDate.ToString("yyyy.MM.dd"), this.EndDate.ToString("yyyy.MM.dd") ));
        if (this.ddl_Shop.SelectedValue != "-1")
        {
            sql.Append("and SaleRecord.shopid='"+this.ddl_Shop.SelectedValue+"' ");

        }
        sql.Append(" order by SaleLsh desc");
        ds = product.GetDateSet(sql.ToString());
        Session["Sale_Record"] = ds;
        return ds;
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:29,代码来源:StoreSalesReport.aspx.cs

示例2: GetProductDataSource

    public DataSet GetProductDataSource()
    {
        Product product = new Product();
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(@"select Product_ID,Barcode,Product_Name,Factory_Weight,Gold_NetWeight,ShouCun,Style,Factory_Name,StorageNo,Descriptions,ProductStatus,ComfirmWeight
                    from Product where ProductStatus='0' or ProductStatus='1'   ");
        sql.Append(" and Product.Delete_YN<>'Y'");

        sql.Append(" order by ProductStatus, Modify_Date desc");

        return product.GetDateSet(sql.ToString());
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:12,代码来源:ComfirmStorage.aspx.cs

示例3: GetProductDataSource

 public DataSet GetProductDataSource()
 {
     Product product = new Product();
     System.Text.StringBuilder sql = new System.Text.StringBuilder();
     sql.Append(@"select Product.Barcode,Product.Product_Name,Product.Factory_Weight,Gold_NetWeight,ShouCun,Price,Style,SuJinFeiYong,GongFei,Factory_Name
                 from Product_Check left join Product on Product_Check.Barcode=Product.Barcode where 1=1");
     if (this.ddl_Type1.SelectedValue != string.Empty && this.ddl_Type1.SelectedValue != "---")
     {
         sql.Append(string.Format(" and Product_Check.ShopName='{0}'", this.ddl_Type1.SelectedValue));
     }
     sql.Append(" order by Product.Modify_Date desc");
     //ds = product.GetDateSet(sql.ToString());
     return product.GetDateSet(sql.ToString());
 }
开发者ID:romanu6891,项目名称:fivemen,代码行数:14,代码来源:Shop_CheckView.aspx.cs

示例4: GetProductDataSource

    public DataSet GetProductDataSource()
    {
        Product product = new Product();
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(@"select Product_ID,Barcode,Product_Name,Factory_Weight,Gold_NetWeight,ShouCun,Price,Style,Old_NO,Real_Number,SuJinFeiYong,GongFei,Factory_Name
                    from Product where 1=1");
        if (this.ddl_OrderName.SelectedValue != string.Empty && this.ddl_OrderName.SelectedValue != "---")
        {
            sql.Append(string.Format(" and Factory_Name='{0}'", this.ddl_OrderName.SelectedValue));
        }
        if (this.ddl_Type.SelectedValue != string.Empty && this.ddl_Type.SelectedValue != "---")
        {
            sql.Append(string.Format(" and Product.LeiBie='{0}'",this.ddl_Type.SelectedValue));
        }
        if (this.ddl_Type0.SelectedValue != string.Empty && this.ddl_Type0.SelectedValue != "---")
        {
            sql.Append(string.Format(" and Product.Cailiao='{0}'", this.ddl_Type0.SelectedValue));
        }
        if (this.txt_Barcode.Text != string.Empty)
        {
            sql.Append(string.Format(" and Barcode like '%{0}%'",product.DatabaseAccess.ConvertToDBString(this.txt_Barcode.Text)));
        }
        if (this.txt_ProductName.Text != string.Empty)
        {
            sql.Append(string.Format(" and Product_Name like '%{0}%'", product.DatabaseAccess.ConvertToDBString(this.txt_ProductName.Text)));
        }
        if (ddl_Type1.SelectedValue != string.Empty && ddl_Type1.SelectedValue != "---")
        {
            sql.Append(string.Format(" and (ShopName1='{0}' or ShopName2='{0}')", ddl_Type1.SelectedValue));
        }
        else
        {
            sql.Append(string.Format(" and ShopName1 is null and ShopName2 is null"));
        }
        if (this.chk_IsSaled.Checked)
        {
            sql.Append(string.Format(" and isSaled='Y'"));
        }
        sql.Append(" and Product.Delete_YN<>'Y'");

        sql.Append(" order by Modify_Date desc");
        return product.GetDateSet(sql.ToString());
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:43,代码来源:Product_List.aspx.cs

示例5: GetProductDataSource

    public DataSet GetProductDataSource()
    {
        Product product = new Product();
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(@"select Barcode,Product_Name,Factory_Weight,Gold_NetWeight,ShouCun,Price,Style,SuJinFeiYong,GongFei,Factory_Name
                    from Product where 1=1");
        if (this.ddl_Type1.SelectedValue != string.Empty && this.ddl_Type1.SelectedValue != "---")
        {
            sql.Append(string.Format(" and ShopName1='{0}' and ShopName2='{0}'", this.ddl_Type1.SelectedValue));
        }
        if (this.ddl_Type.SelectedValue != string.Empty && this.ddl_Type.SelectedValue != "---")
        {
            sql.Append(string.Format(" and Product.LeiBie='{0}'",this.ddl_Type.SelectedValue));
        }
        if (this.ddl_Type0.SelectedValue != string.Empty && this.ddl_Type0.SelectedValue != "---")
        {
            sql.Append(string.Format(" and Product.Cailiao='{0}'", this.ddl_Type0.SelectedValue));
        }
        sql.Append(" and Product.Delete_YN<>'Y' and Product.isSaled <> 'Y'");

        sql.Append(" order by Modify_Date desc");
        //ds = product.GetDateSet(sql.ToString());
        return product.GetDateSet(sql.ToString());
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:24,代码来源:Show_view.aspx.cs

示例6: btn_OK_Click

    protected void btn_OK_Click(object sender, EventArgs e)
    {
        string filedownloadurl = ConfigurationManager.AppSettings["FileDownloadPath"];

        Small_Type st = new Small_Type();
        Product o = new Product();
        string sql = string.Empty;
        sql = string.Format(@"select Product.*,Shop_Sale.Customer from Shop_Sale left join  Product on Shop_Sale.Barcode=Product.Barcode where Shop_Sale.Barcode='{0}'", this.TextBoxEx1.Text.Trim());
        DataSet ds = o.GetDateSet(sql);
        DataTable dt = ds.Tables[0];
        if (dt.Rows.Count > 0)
        {
            DataRow dr = dt.Rows[0];
            if (dr["LeiBie"] != DBNull.Value)
            {
                if (ddl_LeiBie.Items.FindByValue(dr["LeiBie"].ToString()) != null)
                {
                    ddl_LeiBie.SelectedValue = dr["LeiBie"].ToString();
                }
            }
            if (dr["Factory_Weight"] != DBNull.Value)
            {
                txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
            }
            if (dr["Factory_Name"] != DBNull.Value)
            {
                if (ddl_OrderName.Items.FindByValue(dr["Factory_Name"].ToString()) != null)
                {
                    ddl_OrderName.SelectedValue = dr["Factory_Name"].ToString();
                }
            }
            if (dr["Style"] != DBNull.Value)
            {
                txt_StyleID.Text = dr["Style"].ToString();
            }
            if (dr["Cailiao"] != DBNull.Value)
            {
                if (ddl_SmallType.Items.FindByValue(dr["Cailiao"].ToString()) != null)
                {
                    ddl_SmallType.SelectedValue = dr["Cailiao"].ToString();
                }
            }
            if (dr["Factory_Weight"] != DBNull.Value)
            {
                txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
            }

            if (dr["Gold_NetWeight"] != DBNull.Value)
            {
                txt_NetGoldWeight.Text = Convert.ToDecimal(dr["Gold_NetWeight"].ToString()).ToString("N2");

            }
            if (dr["Barcode"] != DBNull.Value)
            {
                TextBoxEx1.Text = dr["Barcode"].ToString();
            }
            if (dr["Product_Name"] != DBNull.Value)
            {
                txt_ProductName.Text = dr["Product_Name"].ToString();
            }
            if (dr["Style"] != DBNull.Value)
            {
                txt_StyleID.Text = dr["Style"].ToString();
            }
            if (dr["Price"] != DBNull.Value)
            {
                txt_Price.Text = dr["Price"].ToString();
            }
            if (dr["Old_NO"] != DBNull.Value)
            {
                txt_OldNO.Text = dr["Old_NO"].ToString();
            }
            if (dr["ShouCun"] != DBNull.Value)
            {
                txt_Size.Text = dr["ShouCun"].ToString();
            }

            if (dr["SuJinFeiYong"] != DBNull.Value)
            {
                txt_SuJinGongFei.Text = Convert.ToDecimal(dr["SuJinFeiYong"].ToString()).ToString("N2");
            }
            if (dr["GongFei"] != DBNull.Value)
            {
                txt_GongFei.Text = Convert.ToDecimal(dr["GongFei"].ToString()).ToString("N2");
            }
            if (dr["Real_Number"] != DBNull.Value)
            {
                txt_Count.Text = dr["Real_Number"].ToString();
            }

            if (dr["Descriptions"] != DBNull.Value)
            {
                txt_Description.Value = dr["Descriptions"].ToString();
            }
            if (dr["Picture"] != DBNull.Value && dr["Picture"].ToString() != string.Empty)
            {
                this.hiddenforimage.Value = filedownloadurl + "/" + dr["Picture"].ToString();
            }
            else
            {
//.........这里部分代码省略.........
开发者ID:romanu6891,项目名称:fivemen,代码行数:101,代码来源:Product_Sale_Confirm.aspx.cs

示例7: btn_OK_Click

    protected void btn_OK_Click(object sender, EventArgs e)
    {
        {
            string filedownloadurl = ConfigurationManager.AppSettings["FileDownloadPath"];

            Small_Type st = new Small_Type();
            Product o = new Product();
            string sql = string.Empty;
            sql = string.Format(@"select Product.* from Product where Barcode='{0}' update Product set ShopName1='{1}' where  Barcode='{0}'", this.txt_Barcode.Text.Trim(), this.ddl_OrderName0.SelectedValue);
            DataSet ds = o.GetDateSet(sql);
            DataTable dt = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                if (dr["LeiBie"] != DBNull.Value)
                {
                    if (ddl_LeiBie.Items.FindByValue(dr["LeiBie"].ToString()) != null)
                    {
                        ddl_LeiBie.SelectedValue = dr["LeiBie"].ToString();
                    }
                }
                if (dr["Factory_Weight"] != DBNull.Value)
                {
                    txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
                }
                if (dr["Factory_Name"] != DBNull.Value)
                {
                    if (ddl_OrderName.Items.FindByValue(dr["Factory_Name"].ToString()) != null)
                    {
                        ddl_OrderName.SelectedValue = dr["Factory_Name"].ToString();
                    }
                }
                if (dr["Style"] != DBNull.Value)
                {
                    txt_StyleID.Text = dr["Style"].ToString();
                }
                if (dr["Cailiao"] != DBNull.Value)
                {
                    if (ddl_SmallType.Items.FindByValue(dr["Cailiao"].ToString()) != null)
                    {
                        ddl_SmallType.SelectedValue = dr["Cailiao"].ToString();
                    }
                }
                if (dr["Factory_Weight"] != DBNull.Value)
                {
                    txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
                }

                if (dr["Gold_NetWeight"] != DBNull.Value)
                {
                    txt_NetGoldWeight.Text = Convert.ToDecimal(dr["Gold_NetWeight"].ToString()).ToString("N2");

                }
                if (dr["Barcode"] != DBNull.Value)
                {
                    txt_Barcode.Text = dr["Barcode"].ToString();
                    ViewState["Barcode"] = dr["Barcode"].ToString();
                }
                if (dr["Product_Name"] != DBNull.Value)
                {
                    txt_ProductName.Text = dr["Product_Name"].ToString();
                }
                if (dr["Style"] != DBNull.Value)
                {
                    txt_StyleID.Text = dr["Style"].ToString();
                }
                if (dr["Price"] != DBNull.Value)
                {
                    txt_Price.Text = dr["Price"].ToString();
                }
                if (dr["Old_NO"] != DBNull.Value)
                {
                    txt_OldNO.Text = dr["Old_NO"].ToString();
                }
                if (dr["ShouCun"] != DBNull.Value)
                {
                    txt_Size.Text = dr["ShouCun"].ToString();
                }

                if (dr["SuJinFeiYong"] != DBNull.Value)
                {
                    txt_SuJinGongFei.Text = Convert.ToDecimal(dr["SuJinFeiYong"].ToString()).ToString("N2");
                }
                if (dr["GongFei"] != DBNull.Value)
                {
                    txt_GongFei.Text = Convert.ToDecimal(dr["GongFei"].ToString()).ToString("N2");
                }
                if (dr["Real_Number"] != DBNull.Value)
                {
                    txt_Count.Text = dr["Real_Number"].ToString();
                }

                if (dr["Descriptions"] != DBNull.Value)
                {
                    txt_Description.Value = dr["Descriptions"].ToString();
                }
                if (dr["Picture"] != DBNull.Value && dr["Picture"].ToString() != string.Empty)
                {
                    this.hiddenforimage.Value = filedownloadurl + "/" + dr["Picture"].ToString();
                }
//.........这里部分代码省略.........
开发者ID:romanu6891,项目名称:fivemen,代码行数:101,代码来源:Product_Send.aspx.cs

示例8: LoadData

    public void LoadData()
    {
        string filedownloadurl = ConfigurationManager.AppSettings["FileDownloadPath"];

        Small_Type st=new Small_Type();
        Product o = new Product();
        string sql = string.Empty;
        if (ViewState["Barcode"] != null && ViewState["Barcode"].ToString() != string.Empty)
        {
            sql = string.Format(@"select Product.* from Product where Barcode={0}", ViewState["Barcode"].ToString());
        }
        else
        {
            sql = string.Format(@"select Product.* from Product where Product_ID={0}", ProductID);
        }
        DataSet ds = o.GetDateSet(sql);
        DataTable dt = ds.Tables[0];
        if (dt.Rows.Count > 0)
        {
            DataRow dr = dt.Rows[0];
            if (dr["LeiBie"] != DBNull.Value)
            {
                if (ddl_LeiBie.Items.FindByValue(dr["LeiBie"].ToString()) != null)
                {
                    ddl_LeiBie.SelectedValue = dr["LeiBie"].ToString();
                }
            }
            if (dr["Factory_Weight"] != DBNull.Value)
            {
                txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
            }
            if (dr["Factory_Name"] != DBNull.Value)
            {
                if (ddl_OrderName.Items.FindByValue(dr["Factory_Name"].ToString()) != null)
                {
                    ddl_OrderName.SelectedValue = dr["Factory_Name"].ToString();
                }
            }
            if (dr["Style"] != DBNull.Value)
            {
                txt_StyleID.Text = dr["Style"].ToString();
            }
            if (dr["Cailiao"] != DBNull.Value)
            {
                if (ddl_SmallType.Items.FindByValue(dr["Cailiao"].ToString()) != null)
                {
                    ddl_SmallType.SelectedValue = dr["Cailiao"].ToString();
                }
            }
            if (dr["Factory_Weight"] != DBNull.Value)
            {
                txt_FactoryWeight.Text = Convert.ToDecimal(dr["Factory_Weight"].ToString()).ToString("N2");
            }

            if (dr["Gold_NetWeight"] != DBNull.Value)
            {
                txt_NetGoldWeight.Text = Convert.ToDecimal(dr["Gold_NetWeight"].ToString()).ToString("N2");

            }
            if (dr["Barcode"] != DBNull.Value)
            {
                txt_Barcode.Text = dr["Barcode"].ToString();
                ViewState["Barcode"] = dr["Barcode"].ToString();
            }
            if (dr["Product_Name"] != DBNull.Value)
            {
                txt_ProductName.Text = dr["Product_Name"].ToString();
            }
            if (dr["Style"] != DBNull.Value)
            {
                txt_StyleID.Text = dr["Style"].ToString();
            }
            if (dr["Price"] != DBNull.Value)
            {
                txt_Price.Text = dr["Price"].ToString();
            }
            if (dr["Old_NO"] != DBNull.Value)
            {
                txt_OldNO.Text = dr["Old_NO"].ToString();
            }
            if (dr["ShouCun"] != DBNull.Value)
            {
                txt_Size.Text = dr["ShouCun"].ToString();
            }

            if (dr["SuJinFeiYong"] != DBNull.Value)
            {
                txt_SuJinGongFei.Text = Convert.ToDecimal(dr["SuJinFeiYong"].ToString()).ToString("N2");
            }
            if (dr["GongFei"] != DBNull.Value)
            {
                txt_GongFei.Text = Convert.ToDecimal(dr["GongFei"].ToString()).ToString("N2");
            }
            if (dr["Real_Number"] != DBNull.Value)
            {
                txt_Count.Text = dr["Real_Number"].ToString();
            }

            if (dr["Descriptions"] != DBNull.Value)
            {
//.........这里部分代码省略.........
开发者ID:romanu6891,项目名称:fivemen,代码行数:101,代码来源:Product_Profile.aspx.cs

示例9: btn_DeletePicture_Click

 protected void btn_DeletePicture_Click(object sender, EventArgs e)
 {
     string fileSavePath = MapPath(ConfigurationManager.AppSettings["FileServerPath"]);
     Product o = new Product();
     string sql = string.Empty;
     if (ViewState["Barcode"] != null && ViewState["Barcode"].ToString() != string.Empty)
     {
         sql = string.Format(@"select Picture from Product where Barcode={0}", ViewState["Barcode"].ToString());
     }
     else
     {
         sql = string.Format(@"select Picture from Product where Product_ID={0}", ProductID);
     }
     DataSet ds = o.GetDateSet(sql);
     DataTable dt = ds.Tables[0];
     if (dt.Rows.Count > 0 && dt.Rows[0][0] != null && dt.Rows[0][0].ToString() != string.Empty)
     {
         string picurl = fileSavePath + "\\" + dt.Rows[0][0].ToString();
         if (File.Exists(picurl))
         {
             if (!o.HaveProductExist(dt.Rows[0][0].ToString()))
             {
                 File.Delete(picurl);
             }
         }
     }
     string sqlupdate = string.Empty;
     if (ViewState["Barcode"] != null && ViewState["Barcode"].ToString() != string.Empty)
     {
         sqlupdate = string.Format(@"update Product set Picture='' where Barcode={0}", ViewState["Barcode"].ToString());
     }
     else
     {
         sqlupdate = string.Format(@"update Product set Picture='' where Product_ID={0}", ProductID);
     }
     o.DatabaseAccess.ExecuteNonQuery(sqlupdate);
     Response.Write("<script>alert('Delete picture succeed!');</script>");
     LoadData();
 }
开发者ID:romanu6891,项目名称:fivemen,代码行数:39,代码来源:Product_Profile.aspx.cs


注:本文中的Product.GetDateSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。