Exemplo n.º 1
0
    private void BinddrpCustType()
    {
        DataTable dt = ProviderInfoBus.GetdrpCustType();

        if (dt != null && dt.Rows.Count > 0)
        {
            drpCustType.DataSource     = dt;
            drpCustType.DataTextField  = "TypeName";
            drpCustType.DataValueField = "ID";
            drpCustType.DataBind();
        }
    }
Exemplo n.º 2
0
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        string CustNo   = this.txtCustNo.Text;
        string CustName = this.txtCustName.Text;
        string CustNam  = this.txtCustNam.Text;
        string PYShort  = this.txtPYShort.Text;
        string CustType = this.drpCustType.Value;

        if (CustType == "0")
        {
            CustType = "";
        }
        string CustClass = this.txtCustClass.Value;
        string AreaID    = this.drpAreaID.Value;

        if (AreaID == "0")
        {
            AreaID = "";
        }
        string CreditGrade = this.drpCreditGrade.Value;

        if (CreditGrade == "0")
        {
            CreditGrade = "";
        }
        string Manager         = this.HidManager.Value;
        string StartCreateDate = this.txtStartCreateDate.Text;
        string EndCreateDate   = this.txtEndCreateDate.Text;



        int       TotalCount = 0;
        DataTable dt         = ProviderInfoBus.SelectProviderInfo(1, 1000000, "ID", ref TotalCount, CustNo, CustName, CustNam, PYShort, CustType, CustClass, AreaID, CreditGrade, Manager, StartCreateDate, EndCreateDate);



        //DataTable dt = WorkCenterBus.GetWorkCenterListBycondition(model, 1, 1000000, "ID desc", ref totalCount);

        //导出标题
        string headerTitle = "供应商编号|供应商名称|供应商简称|供应商拼音代码|供应商类别|供应商分类|所在区域|分管采购员|优质级别|建挡人|建挡日期";

        string[] header = headerTitle.Split('|');

        //导出标题所对应的列字段名称
        string columnFiled = "CustNo|CustName|CustNam|PYShort|CustTypeName|CustClassName|AreaName|ManagerName|CreditGradeName|CreatorName|CreateDate";

        string[] field = columnFiled.Split('|');

        XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "供应商档案列表");
    }
Exemplo n.º 3
0
    private void BinddrpCustType()
    {
        DataTable dt = ProviderInfoBus.GetdrpCustType();

        if (dt != null && dt.Rows.Count > 0)
        {
            drpCustType.DataSource     = dt;
            drpCustType.DataTextField  = "TypeName";
            drpCustType.DataValueField = "ID";
            drpCustType.DataBind();
            ListItem Item = new ListItem("--请选择--", "");
            drpCustType.Items.Insert(0, Item);
        }
    }
Exemplo n.º 4
0
    private void BindTreeChildNodes()
    {
        DataTable dt_product = ProviderInfoBus.GetProviderClass();

        foreach (DataRow row in dt_product.Select("SupperID=0"))
        {
            TreeNode nodes = new TreeNode();
            nodes.Text        = row["CodeName"].ToString();
            nodes.Value       = row["ID"].ToString();
            nodes.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}','{1}');", nodes.Text, nodes.Value);

            LoadSubData(row["ID"].ToString(), nodes, dt_product);
            //node.ChildNodes.Add(nodes);
            this.TreeView1.Nodes.Add(nodes);
            nodes.Expanded = true;
        }
    }
Exemplo n.º 5
0
    private void BinddrpCreditGrade()
    {
        DataTable dt = ProviderInfoBus.GetdrpCreditGrade();

        if (dt != null && dt.Rows.Count > 0)
        {
            drpCreditGrade.DataSource     = dt;
            drpCreditGrade.DataTextField  = "TypeName";
            drpCreditGrade.DataValueField = "ID";
            drpCreditGrade.DataBind();
            //ListItem Item = new ListItem("--请选择--", "");
            //drpCreditGrade.Items.Insert(0, Item);
        }
        ListItem Item = new ListItem();

        Item.Value = "0";
        Item.Text  = "--请选择--";
        drpCreditGrade.Items.Insert(0, Item);
    }
Exemplo n.º 6
0
 private void CustTreeShow(string CustType, TreeNode treenode)
 {
     if (CustType == CUST_PROVIDER)
     {
         //获取供应商信息
         DataTable dt = ProviderInfoBus.GetProviderInfo();
         if (dt != null && dt.Rows.Count > 0)
         {
             foreach (DataRow rows in dt.Rows)
             {
                 TreeNode node   = new TreeNode();
                 string   spanId = "node_" + rows["ID"].ToString();
                 node.Text = " <input name=\"select\" id=\"ra" + rows["ID"] + "\" value=\"" + rows["ID"].ToString() + "|" + rows["CustName"].ToString() + "|2|供应商" + "\" type=\"radio\" />" + rows["CustName"].ToString() + "";
                 //node.Value = rows["ID"].ToString();
                 //node.ImageUrl = "../../../Images/treeimg/page.gif";
                 // node.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}','{1}');", rows["CustName"].ToString() + "|" + rows["ID"].ToString() + "|2|供应商", spanId);
                 treenode.ChildNodes.Add(node);
             }
         }
     }
     else if (CustType == CUST_CUST)
     {
         //获取客户信息
         DataTable dt = CustInfoBus.GetCustInfo();
         if (dt != null && dt.Rows.Count > 0)
         {
             foreach (DataRow rows in dt.Rows)
             {
                 TreeNode node   = new TreeNode();
                 string   spanId = "node_" + rows["ID"].ToString();
                 node.Text = " <input name=\"select\" id=\"ra" + rows["ID"] + "\" value=\"" + rows["ID"].ToString() + "|" + rows["CustName"].ToString() + "|1|客户" + "\" type=\"radio\" />" + rows["CustName"].ToString() + "";
                 //node.Value = rows["ID"].ToString();
                 //node.ImageUrl = "../../../Images/treeimg/page.gif";
                 //node.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}','{1}');", rows["CustName"].ToString() + "|" + rows["ID"].ToString() + "|1|客户", spanId);
                 treenode.ChildNodes.Add(node);
             }
         }
     }
     else if (CustType == CUST_OTHER)
     {
         //获取其他客户信息
         DataTable dt = CheckReportBus.GetOtherInfo();
         if (dt != null && dt.Rows.Count > 0)
         {
             foreach (DataRow rows in dt.Rows)
             {
                 TreeNode node   = new TreeNode();
                 string   spanId = "node_" + rows["ID"].ToString();
                 node.Text = " <input name=\"select\" id=\"ra" + rows["ID"] + "\" value=\"" + rows["ID"].ToString() + "|" + rows["CustName"].ToString() + "|7|其他客户" + "\" type=\"radio\" />" + rows["CustName"].ToString() + "";
                 //node.Value = rows["ID"].ToString();
                 //node.ImageUrl = "../../../Images/treeimg/page.gif";
                 //  node.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}','{1}');", rows["CustName"].ToString() + "|" + rows["ID"].ToString() + "|7|其他客户", spanId);
                 treenode.ChildNodes.Add(node);
             }
         }
     }
     else if (CustType == CUST_FOREIGN)
     {//获取外协
         DataTable dt = CheckReportBus.GetForeignInfo();
         if (dt != null && dt.Rows.Count > 0)
         {
             foreach (DataRow rows in dt.Rows)
             {
                 TreeNode node   = new TreeNode();
                 string   spanId = "node_" + rows["ID"].ToString();
                 node.Text = " <input name=\"select\" id=\"ra" + rows["ID"] + "\" value=\"" + rows["ID"].ToString() + "|" + rows["CustName"].ToString() + "|5|外协加工厂" + "\" type=\"radio\" />" + rows["CustName"].ToString() + "";
                 //node.Value = rows["ID"].ToString();
                 //node.ImageUrl = "../../../Images/treeimg/page.gif";
                 // node.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}','{1}');", rows["CustName"].ToString() + "|" + rows["ID"].ToString() + "|5|外协加工厂", spanId);
                 treenode.ChildNodes.Add(node);
             }
         }
     }
 }
Exemplo n.º 7
0
    protected void LoadPrintInfo()
    {
        PrintParameterSettingModel model = new PrintParameterSettingModel();

        model.CompanyCD     = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        model.BillTypeFlag  = int.Parse(ConstUtil.BILL_TYPEFLAG_PURCHASE);
        model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_PROVIDERINFO;

        /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/
        string[,] aBase =
        {
            { "供应商编号",   "CustNo"           },
            { "供应商类别",   "CustTypeName"     },
            { "供应商分类",   "CustClassName"    },
            { "供应商名称",   "CustName"         },
            { "供应商简称",   "CustNam"          },
            { "供应商拼音代码", "PYShort"          },
            { "供应商简介",   "CustNote"         },
            { "国家地区",    "CountryName"      },
            { "省",       "Province"         },
            { "市",       "City"             },
            { "邮编",      "Post"             },
            { "联系人",     "ContactName"      },
            { "电话",      "Tel"              },
            { "传真",      "Fax"              },
            { "手机",      "Mobile"           },
            { "邮件",      "email"            },
            { "在线咨询",    "OnLine"           },
            { "公司网址",    "WebSite"          },
            { "交货方式",    "TakeTypeName"     },
            { "运送方式",    "CarryTypeName"    },
            { "供应商优先级别", "CreditGradeName"  },
            { "热点供应商",   "HotIsName"        },
            { "启用状态",    "UsedStatusName"   },
            { "分管采购员",   "ManagerName"      },
            { "联络期限",    "LinkCycle"        },
            { "所在地区",    "AreaName"         },
            { "发货地址",    "SendAddress"      },
            { "经营范围",    "SellArea"         },
            { "结算方式",    "PayTypeName"      },
            { "币种",      "CurrencyTypeName" },
            { "开户行",     "OpenBank"         },
            { "户名",      "AccountMan"       },
            { "帐号",      "AccountNum"       },
            { "成立时间",    "SetupDate"        },
            { "法人代表",    "ArtiPerson"       },
            { "一般纳税人",   "IsTaxName"        },
            { "税务登记号",   "TaxCD"            },
            { "营业执照号",   "BusiNumber"       },
            { "热度",      "HotHowName"       },
        };
        DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model);

        DataTable dtProviderInfo = ProviderInfoBus.SelectProviderInfo(this.intMrpID);

        string strBaseFields   = "";
        string strDetailFields = "";
        /*第二明细*/
        string strDetailSecondFields = "";

        if (dbPrint.Rows.Count > 0)
        {
            isSeted.Value   = "1";
            strBaseFields   = dbPrint.Rows[0]["BaseFields"].ToString();
            strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString();
            /*第二明细*/
            strDetailSecondFields = dbPrint.Rows[0]["DetailSecondFields"].ToString();
        }
        else
        {
            isSeted.Value = "0";
            strBaseFields = "CustNo|CustTypeName|CustClassName|CustName|CustNam|PYShort|CustNote|CountryName|Province|City|Post|ContactName|Tel|Fax|Mobile|email|OnLine|WebSite|TakeTypeName|CarryTypeName|CreditGradeName|HotIsName|UsedStatusName|ManagerName|LinkCycle|AreaName|SendAddress|SellArea|PayTypeName|CurrencyTypeName|OpenBank|AccountMan|AccountNum|SetupDate|ArtiPerson|IsTaxName|TaxCD|BusiNumber|HotHowName";
        }

        #region 2.主表信息
        if (!string.IsNullOrEmpty(strBaseFields))
        {
            tableBase.InnerHtml = WritePrintPageTable("供应商档案", strBaseFields, null, aBase, null, dtProviderInfo, null, true);
        }
        #endregion

        //#region 3.明细信息
        //if (!string.IsNullOrEmpty(strDetailFields))
        //{
        //    tableDetail.InnerHtml = WritePrintPageTable("物料需求计划", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false);
        //}
        //#endregion

        ///*第二明细*/
        //#region 4.明细信息2
        //if (!string.IsNullOrEmpty(strDetailSecondFields))
        //{
        //    tableDetail2.InnerHtml = WritePrintPageTable("物料需求计划", strBaseFields, strDetailSecondFields, aBase, aSecondDetail, dtMRP, dtDetail, false);
        //}
        //#endregion
    }