Example #1
0
        public override string GetCodeorID(string strID, BaseData bd, string codeorid)
        {
            string strCode = string.Empty;

            try
            {
                Model.APIData  apidta  = bd as Model.APIData;
                DAL.Rdrecord32 rd32dal = new DAL.Rdrecord32();

                if (codeorid == "code")
                {
                    strCode = rd32dal.GetCodeByID(strID, apidta.ConnectInfo.Constring);
                }
                if (codeorid == "id")
                {
                    strCode = rd32dal.GetIDByCode(strID, apidta.ConnectInfo.Constring);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(strCode);
        }
Example #2
0
File: Common.cs Project: sky-tc/U8
        /// <summary>
        /// 获取来源单据表体信息
        /// </summary>
        /// <param name="Vouchertype"></param>
        /// <param name="Voucherno"></param>
        /// <param name="Constring"></param>
        /// <returns></returns>
        public static DataSet GetSourceDetailDataset(string Vouchertype, string Voucherno, string Constring)
        {
            DataSet ds = null;

            switch (Vouchertype)
            {
            case "88":
                ds = GetPO_Podetails(Voucherno, Constring);
                break;

            case "17":
                ds = GetSO_SODetails(Voucherno, Constring);
                break;

            case "27":
                ds = GetPU_AppVouchs(Voucherno, Constring);
                break;

            case "24":
                DAL.Rdrecord01 rd01dal = new DAL.Rdrecord01();
                ds = rd01dal.GetRdrecord01sByCode(Voucherno, Constring);
                break;

            case "0303":
                DAL.Rdrecord32 rd32dal = new DAL.Rdrecord32();
                ds = rd32dal.GetRdrecords32ByCode(Voucherno, Constring);
                break;

            case "01":       //发货单
                ds = GetDispatchLists(Voucherno, Constring);
                break;

            case "03":      //退货单    added by liuxzha  2014.11.27
                ds = GetDispatchLists(Voucherno, Constring);
                break;

            case "0304":    //调拨单
                ds = GetTransVouchs(Voucherno, Constring);
                break;

            case "0301":    //其他入库单
                ds = GetRdRecords08(Voucherno, Constring);
                break;

            case "0302":    //其他出库单
                ds = GetRdRecords09(Voucherno, Constring);
                break;

            case "26":    //到货单
                ds = GetPU_ArrivalVouchs(Voucherno, Constring);
                break;

            case "MO21":     //生产订单
                DAL.CQ.Mom_order modal = new DAL.CQ.Mom_order();
                ds = modal.GetMom_orderdetailByCode(Voucherno, Constring);
                break;

            case "0411":      //产成品入库单
                ds = GetRdRecords10(Voucherno, Constring);
                break;
            }
            BLL.Common.ErrorMsg(ds, "表体信息获取为空");
            return(ds);
        }